Hi! I have a problem with pthread_create on a device with only 16MB RAM. strace shows this:
old_mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) instead of (what I obtained on another device with 32MB RAM): old_mmap(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 2143089904, 0x2b985918) = 0x2bc6b000 mprotect(0x2bc6b000, 4096, PROT_NONE) = 0 clone(child_stack=0x2c46a3b0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x2c46a6f8, tls=0x2c471960, child_tidptr=0) = 1394 which is quite reasonable because 8388608 is greater than half the amount of available physical memory which AFAIK is a limit for memory allocations normally. When I did echo 1 > /proc/sys/vm/overcommit_memory everything worked like a charm (because this limit was disabled). How can I tune uClibc to not request so much memory on pthread_create? -- Alexander
signature.asc
Description: PGP signature
_______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
