blob: c19a7fcdb78b9dd826f2ced6084414b21e21bfe8 (
plain) (
blame)
| ofs | hex dump | ascii |
|---|
| 0000 | 42 4d c6 2d 00 00 00 00 00 00 36 00 00 00 28 00 00 00 48 00 00 00 36 00 00 00 01 00 18 00 00 00 | BM.-......6...(...H...6......... |
| 0020 | 00 00 90 2d 00 00 12 0b 00 00 12 0b 00 00 00 00 00 00 00 00 00 00 0f 11 09 0e 0e 04 11 15 0c 14 | ...-.......................#include "audiobeamlibmalloc.h"
#define AUDIOBEAM_HEAP_SIZE 10000
static char audiobeam_simulated_heap[AUDIOBEAM_HEAP_SIZE];
static unsigned int audiobeam_freeHeapPos;
void *audiobeam_malloc( unsigned int numberOfBytes )
{
void *currentPos = ( void * )&audiobeam_simulated_heap[ audiobeam_freeHeapPos ];
/* Get a 4-byte address for alignment purposes */
audiobeam_freeHeapPos += ( ( numberOfBytes + 4 ) & ( unsigned int )0xfffffffc );
return currentPos;
}
|