Max 5 API Reference
00001 /** 00002 @defgroup memory Memory Management 00003 00004 In the past, Max has provided two separate APIs for memory management. 00005 One for allocating memory on the stack so that it was interrupt safe, 00006 including the getbytes() and freebytes() functions. 00007 The other, the "sysmem" API, were for allocating memory on the heap 00008 where larger amounts of memory were needed and the code could be guaranteed to 00009 operate at non-interrupt level. 00010 00011 Many things have changed in the environment of recent operating systems 00012 (MacOS X and Windows XP/Vista), the memory routines function differently, 00013 and the scheduler is no longer directly triggered by a hardware interrupt. 00014 In Max 5, the sysmem and getbytes API's have been unified, and thus may be 00015 used interchangeably. 00016 00017 The memory management unification can be switched on and off in the header files 00018 if needed, to compile code for older versions of Max for example, by changing 00019 the use of #MM_UNIFIED in the Max headers. 00020 00021 @section The Sysmem API 00022 00023 The Sysmem API provides a number of utilities for allocating and 00024 managing memory. It is relatively similar to some of the Macintosh 00025 Memory Manager API, and not too different from Standard C library 00026 memory functions. It is <em>not</em> safe to mix these routines with other 00027 memory routines (e.g. don’t use malloc() to allocate a pointer, and 00028 sysmem_freeptr() to free it). 00029 00030 00031 */ 00032
Copyright © 2008, Cycling '74