mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-05-01 20:36:25 +00:00
In emulation, return always 1mb of memory.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
742c3f3e3c
commit
bc20f98b44
1 changed files with 4 additions and 0 deletions
|
|
@ -28,9 +28,13 @@ extern void scan_all();
|
|||
|
||||
extern char __StackLimit;
|
||||
int heapLeft() {
|
||||
#ifndef ENABLE_EMULATION
|
||||
char *p = malloc(256); // try to avoid undue fragmentation
|
||||
int left = &__StackLimit - p;
|
||||
free(p);
|
||||
#else
|
||||
int left = 1024*1024;
|
||||
#endif
|
||||
return left;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue