mariadb/linux/tests/test-wss.c
Rich Prohaska 0d44815bf5 merge some tokudb.1032 into 1032b. addresses #1032
git-svn-id: file:///svn/toku/tokudb.1032b@7778 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:27 -04:00

30 lines
508 B
C

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <stdint.h>
#include <inttypes.h>
#include <os.h>
static void do_mallocs(void) {
int i;
for (i=0; i<1000; i++) {
int nbytes = 1024*1024;
void *vp = malloc(nbytes);
memset(vp, 0, nbytes);
}
}
int main(void) {
int64_t rss;
os_get_max_rss(&rss);
printf("%"PRId64"\n", rss);
do_mallocs();
os_get_max_rss(&rss);
printf("%"PRId64"\n", rss);
return 0;
}