Changeset 1564c4b in mainline for uspace/app/tester/mm/malloc2.c
- Timestamp:
- 2011-06-08T19:39:52Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2af29ed
- Parents:
- e686889c (diff), 0eff68e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/mm/malloc2.c
re686889c r1564c4b 1 1 /* 2 * Copyright (c) 20 09 Martin Decky2 * Copyright (c) 2011 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 #include <test.h> 29 #include <stdio.h> 30 #include <unistd.h> 31 #include <stdlib.h> 32 #include <malloc.h> 33 #include "../tester.h" 30 34 31 const char *test_ fpu1(void)35 const char *test_malloc2(void) 32 36 { 37 int cnt = 0; 38 char *p; 39 40 TPRINTF("Provoking the kernel into overcommitting memory to us...\n"); 41 while ((p = malloc(1024 * 1024))) { 42 TPRINTF("%dM ", ++cnt); 43 *p = 'A'; 44 } 45 TPRINTF("\nWas refused more memory as expected.\n"); 46 33 47 return NULL; 34 48 }
Note:
See TracChangeset
for help on using the changeset viewer.