mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 15:24:16 +01:00
5f68cd8242
git-svn-id: file:///svn/toku/tokudb@18191 c7de825b-a66e-492c-adef-691d508d4ae1
31 lines
567 B
C
31 lines
567 B
C
#include <test.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <toku_assert.h>
|
|
#include <string.h>
|
|
#include <stdint.h>
|
|
#include <inttypes.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 test_main(int argc, char *const argv[]) {
|
|
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;
|
|
}
|
|
|
|
|