Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed FastIO FastPWM USBDevice
Fork of Pinscape_Controller by
OpNew.cpp
00001 #include "NewMalloc.h" 00002 00003 // Overload operator new to call our custom malloc. This ensures that 00004 // all 'new' allocations throughout the program (including library code) 00005 // go through our private allocator. 00006 void *operator new(size_t siz) { return xmalloc(siz); } 00007 void *operator new[](size_t siz) { return xmalloc(siz); } 00008 00009 // Since we don't do bookkeeping to track released memory, 'delete' does 00010 // nothing. In actual testing, this routine appears to never be called. 00011 // If it *is* ever called, it will simply leave the block in place, which 00012 // will make it unavailable for re-use but will otherwise be harmless. 00013 void operator delete(void *ptr) { }
Generated on Wed Jul 13 2022 03:30:11 by
1.7.2
