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: FatFileSystemCpp I2SSlave TLV320 mbed
Fork of madplayer by
Diff: lpc1768_mem.cpp
- Revision:
- 4:30b2cf4a8ee2
- Parent:
- 3:6f07b5f52c38
- Child:
- 5:50015f4868e2
--- a/lpc1768_mem.cpp Wed Dec 19 06:01:00 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#include "mbed.h"
-#include "config.h"
-
-static char *free_ptr = (char *)AHBMEM;
-static int free_sz = AHBMEMSIZE;
-void reset_ahb_mem(void)
- {
- free_ptr = (char *)AHBMEM;
- free_sz = AHBMEMSIZE;
- }
-void *mad_malloc(unsigned int sz)
-{
- unsigned int nsz = ((sz >> 3) + 1) << 3; // align to 8 byte
- if(nsz < free_sz)
- {
- char *p = free_ptr;
- free_ptr += nsz;
- free_sz -=nsz;
- return(p);
- }
- else
- {
- return(malloc(sz));
- }
-}
