commit | 0417704254b568a378adc5bdba32d28b840d79ae | [log] [tgz] |
---|---|---|
author | subrata_modak <subrata_modak> | Mon Jun 09 05:28:09 2008 +0000 |
committer | subrata_modak <subrata_modak> | Mon Jun 09 05:28:09 2008 +0000 |
tree | 3562d687cbe163966b744cb70594a52feaea45a1 | |
parent | c06413532d79f0a870708b52e4c6daacbdef9973 [diff] |
mallocstress stresses the VMM and C library by spawning N threads which malloc blocks of increasing size until malloc returns NULL. It occur because test doesn't wait for all thread started. already started threads begin allocate memory, so pthread_create can return ENOMEM. my patch added this synchronizing. I use semaphore, because it can wait-for-zero unlike pthread_mutex. sorry, forgot set permission in semget, new patch attached. Andrew Vagin <avagin@gmail.com>.