mariadb/windows/tests/test-rss.c
Rich Prohaska a245f6204c imp get_max_process_data_size on windows. addresses #1387
git-svn-id: file:///svn/toku/tokudb@8748 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:38 -04:00

31 lines
545 B
C

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <stdint.h>
#include <inttypes.h>
#include <toku_portability.h>
#include <toku_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;
toku_os_get_max_rss(&rss);
printf("%I64d\n", rss);
do_mallocs();
toku_os_get_max_rss(&rss);
printf("%I64d\n", rss);
return 0;
}