mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-22 14:23:50 -07:00
assign size
This commit is contained in:
parent
e78898b483
commit
4cc3fd9397
2 changed files with 5 additions and 6 deletions
|
@ -21,9 +21,6 @@ extern uint8_t _stack_start, __bss_end__;
|
|||
// We know that bss is aligned to 4 bytes.
|
||||
static uint8_t *BigBuf = &__bss_end__;
|
||||
|
||||
void *UMM_MALLOC_CFG_HEAP_ADDR = &__bss_end__;
|
||||
uint32_t UMM_MALLOC_CFG_HEAP_SIZE = (uint32_t)&_stack_start - (uint32_t)&__bss_end__;
|
||||
|
||||
/* BigBuf memory layout:
|
||||
Pointer to highest available memory: s_bigbuf_hi
|
||||
high s_bigbuf_size
|
||||
|
|
|
@ -49,11 +49,9 @@
|
|||
|
||||
#define DBGLOG_LEVEL 0
|
||||
|
||||
//#include "dbglog/dbglog.h"
|
||||
#include "dbprint.h"
|
||||
|
||||
extern void *UMM_MALLOC_CFG_HEAP_ADDR;
|
||||
extern uint32_t UMM_MALLOC_CFG_HEAP_SIZE;
|
||||
extern uint8_t _stack_start, __bss_end__;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
|
@ -232,6 +230,10 @@ static uint16_t umm_assimilate_down( uint16_t c, uint16_t freemask ) {
|
|||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
void umm_init( void ) {
|
||||
|
||||
void *UMM_MALLOC_CFG_HEAP_ADDR = &__bss_end__;
|
||||
uint32_t UMM_MALLOC_CFG_HEAP_SIZE = (uint32_t)&_stack_start - (uint32_t)&__bss_end__;
|
||||
|
||||
/* init heap pointer and size, and memset it to 0 */
|
||||
umm_heap = (umm_block *)UMM_MALLOC_CFG_HEAP_ADDR;
|
||||
umm_numblocks = (UMM_MALLOC_CFG_HEAP_SIZE / sizeof(umm_block));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue