#146: memalign requests huge amounts of memory for large alignments -------------------------------------+-------------------------------------- Reporter: wangqingpei@… | Owner: oxygene Type: defect | Status: closed Priority: blocker | Milestone: Component: libpayload | Resolution: fixed Keywords: | Dependencies: Patchstatus: there is no patch | -------------------------------------+-------------------------------------- Changes (by oxygene):
* keywords: memalign crashed => * status: assigned => closed * resolution: => fixed
Comment:
Fixed in r5298, which included the attached patch.
memalign doesn't try to allocate at least 100 units of memory (which meant 400kb for 4kb of 4kb-aligned memory. It only allocates at least a kilobyte of data, which should match most use cases: For more common 16byte requests, 1kb is allocated and pooled for 16byte requests, for relatively rare 4kb requests, 4kb is allocated (as it's already >1kb)