Added cap on size, fixed 64-bit thing.
This commit is contained in:
@ -361,7 +361,7 @@ $(ESP32_SIM)/Esp32forth-sim: \
|
||||
common/interp.h \
|
||||
$(GEN)/esp32_boot.h \
|
||||
$(GEN)/esp32_sim_opcodes.h | $(ESP32_SIM)
|
||||
$(CXX) $(CFLAGS) -m32 $< -o $@
|
||||
$(CXX) $(CFLAGS) -m32 -D_FILE_OFFSET_BITS=64 $< -o $@
|
||||
strip $(STRIP_ARGS) $@
|
||||
|
||||
sizes: $(ESP32_SIM)/Esp32forth-sim
|
||||
|
||||
@ -125,7 +125,9 @@ static cell_t find(const char *name, cell_t len) {
|
||||
|
||||
static void create(const char *name, cell_t nlength, cell_t flags, void *op) {
|
||||
if (g_sys.latestxt) {
|
||||
g_sys.latestxt[-1] |= ((g_sys.heap - &g_sys.latestxt[1]) << 16);
|
||||
cell_t sz = g_sys.heap - &g_sys.latestxt[1];
|
||||
if (sz < 0 || sz > 0xffff) { sz = 0xffff; }
|
||||
g_sys.latestxt[-1] |= (sz << 16);
|
||||
}
|
||||
g_sys.heap = (cell_t *) CELL_ALIGNED(g_sys.heap);
|
||||
char *pos = (char *) g_sys.heap;
|
||||
|
||||
Reference in New Issue
Block a user