Pass it a max alloc size and an abort function and maybe even user data. Whenever a heap allocation is made which would extend the bytes for that allocator beyond the threshhold, the abort function is called. Maybe it returns, maybe it doesn't.
[Mon Apr 3 19:24 2006] [crit] using 507904 bytes for /all/your/swapspace/are/belong... [Mon Apr 3 19:24 2006] [crit] using 1007616 bytes for /all/your/swapspace/are/belong... [Mon Apr 3 19:24 2006] [crit] aborting request /all/your/swapspace/are/belong... [Mon Apr 3 19:24 2006] [crit] gracefully terminating process 1357 or [Mon Apr 3 19:24 2006] [notice] child pid 1357 exit signal Segmentation fault (11) (no patch)
