site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com I just responded to the "Panic in OSMalloc??" thread and then realized that "what to do when malloc returns NULL" is an interesting question, for which I don't have a good answer... When malloc returns NULL, it makes sense that the system is in some sense constipated. To know how much, you'd need to know how the allocators are implemented and what they are being used for. (Beyond what I know about MacOS X.) It seems to me that a non-blocking malloc returning NULL could just indicate that the allocator has hit a transient high water mark and retrying the allocation allowing blocking would make sense? Whether or not retrying a blocking malloc when it returns NULL is a good plan is more questionable. It seems to me that, for this case, the system may be pretty badly constipated and returning ENOMEM may be preferable? My NFS code was written way back when, when the BSD kernel malloc never failed for the blocking case, so I didn't have to deal with this. I'm hoping others will have comments? rick _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com