Custom New Cp
Custom New Cp
Development · info-mac
| Filename | custom-new-cp.hqx |
|---|---|
| Size | 5.7 KB (5883 bytes) |
| Downloads | 2 |
About
Recently I rewrote my own implementation of the new and delete operators (under CodeWarrior 4.5). My own implementations have the main two following advantages over the standard ones:
- They can take memory from the temporary zone if the application heap is full - They release memory to the OS when it isn't needed any more
I like this behavior better than the standard one, because it allows me to give an average-sized heap to my application and yet still be able to handle big tasks requiring unusual amounts of memory.
I thought I'd share my code with the rest of the world, so here it is. I have binhexed it to preserve the font settings (it's more than 80 columns anyway).
Let me know if you think the idea can be improved, or if you have good reasons why it isn't a good idea!
Cheers,
File Info
This file is from the info-mac archive. It is BinHex encoded — use The Unarchiver to decode it.