diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/malloc.cc | 19 | ||||
-rw-r--r-- | src/new.cc | 19 |
2 files changed, 38 insertions, 0 deletions
diff --git a/src/malloc.cc b/src/malloc.cc new file mode 100644 index 0000000..22b4cdb --- /dev/null +++ b/src/malloc.cc @@ -0,0 +1,19 @@ +/** + * Copying and distribution of this file, with or without modification, + * are permitted in any medium without royalty provided the copyright + * notice and this notice are preserved. This file is offered as-is, + * without any warranty. + */ +#include <cstdlib> + +int main(void) +{ + char* a; + size_t i; + + for (i = 0; i < 40000000UL; i++) + a = (char*)malloc(16); + + return 0; +} + diff --git a/src/new.cc b/src/new.cc new file mode 100644 index 0000000..5e96747 --- /dev/null +++ b/src/new.cc @@ -0,0 +1,19 @@ +/** + * Copying and distribution of this file, with or without modification, + * are permitted in any medium without royalty provided the copyright + * notice and this notice are preserved. This file is offered as-is, + * without any warranty. + */ +#include <cstdlib> + +int main(void) +{ + char* a; + size_t i; + + for (i = 0; i < 40000000UL; i++) + a = new char[16]; + + return 0; +} + |