summaryrefslogtreecommitdiffstats
path: root/all_pairs/source/audiobeam/audiobeamlibmalloc.c
diff options
context:
space:
mode:
authorleochanj105 <leochanj@live.unc.edu>2021-10-26 13:22:32 -0400
committerleochanj105 <leochanj@live.unc.edu>2021-10-26 13:22:32 -0400
commit14c854543b1a3cf344a371a5b45595657f95786b (patch)
tree70f752880522e5e44669af365754ac0f649dce81 /all_pairs/source/audiobeam/audiobeamlibmalloc.c
parent5e2ccfae0532ddd89bcc04bf14aad451e9c79785 (diff)
add deadlines and costs
Diffstat (limited to 'all_pairs/source/audiobeam/audiobeamlibmalloc.c')
-rw-r--r--all_pairs/source/audiobeam/audiobeamlibmalloc.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/all_pairs/source/audiobeam/audiobeamlibmalloc.c b/all_pairs/source/audiobeam/audiobeamlibmalloc.c
deleted file mode 100644
index a81b634..0000000
--- a/all_pairs/source/audiobeam/audiobeamlibmalloc.c
+++ /dev/null
@@ -1,19 +0,0 @@
1#include "audiobeamlibmalloc.h"
2
3#define AUDIOBEAM_HEAP_SIZE 10000
4
5static char audiobeam_simulated_heap[AUDIOBEAM_HEAP_SIZE];
6static unsigned int audiobeam_freeHeapPos;
7
8void *audiobeam_malloc( unsigned int numberOfBytes )
9{
10 void *currentPos = ( void * )&audiobeam_simulated_heap[ audiobeam_freeHeapPos ];
11 /* Get a 4-byte address for alignment purposes */
12 audiobeam_freeHeapPos += ( ( numberOfBytes + 4 ) & ( unsigned int )0xfffffffc );
13 return currentPos;
14}
15
16void audiobeam_free_all( void )
17{
18 audiobeam_freeHeapPos = 0;
19}