In emulation, return always 1mb of memory.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2023-01-12 20:04:44 +01:00
parent 742c3f3e3c
commit bc20f98b44
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -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;
}