Changeset 544a2e4 in mainline for uspace/app/tester/mm/malloc2.c
- Timestamp:
- 2011-05-30T21:37:43Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7b712b60
- Parents:
- 18ba2e4f (diff), 0743493a (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
r18ba2e4f r544a2e4 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.