Damien George
58ba4c3b4c
py: Check explicitly for memory allocation failure in parser.
Previously, a failed malloc/realloc would throw an exception, which was
not caught. I think it's better to keep the parser free from NLR
(exception throwing), hence this patch.
11 years ago
Damien George
f0954e3fac
py: Add emergency exception object for when heap allocation fails.
11 years ago
Damien George
12bab72d93
Improve GC finalisation code; add option to disable it.
11 years ago
Damien George
6902eeda25
py: Add m_malloc_fail function to handle memory allocation error.
A malloc/realloc fail now throws MemoryError.
11 years ago
mux
4f7e9f5c44
Implement del
11 years ago
Damien George
70f33cde48
py: Fix up so that it can compile without float.
11 years ago
xbe
efe3422394
py: Clean up includes.
Remove unnecessary includes. Add includes that improve portability.
11 years ago
Damien George
1dc76af7bf
py: Remove name of var arg from macros with var args.
11 years ago
Paul Sokolovsky
44739e280e
Make DEBUG_printf() a proper function, implementation is port-dependent.
In particular, unix outputs to stderr, to allow to run testsuite against
micropython built with debug output (by redirecting stderr to /dev/null).
11 years ago
Paul Sokolovsky
520e2f58a5
Replace global "static" -> "STATIC", to allow "analysis builds". Part 2.
11 years ago
Paul Sokolovsky
b62c30b4bc
Generalize malloc-via-gc-heap support, make it available to unix port.
11 years ago
Paul Sokolovsky
58ff93bc7c
Get rid of calloc().
If there's malloc and memset, then there's no need for calloc, especially if
we need to implement it ourselves.
11 years ago
Paul Sokolovsky
cdd2c62e07
realloc(): Log original memory ptr too.
To alloc complete memory alloc flow tracing.
11 years ago
Damien George
2d15c1216d
stm: Add optional memory debugging output.
11 years ago
Paul Sokolovsky
b372bfca21
Rename default config file to mpconfig.h, and port's to mpconfigport.h.
mpconfig.h will automatically pull mpconfigport.h.
11 years ago
Paul Sokolovsky
ef18102b9e
Make it possible to turn off collecting memory stats (MICROPY_MEM_STATS).
11 years ago
Paul Sokolovsky
780f555b2e
Add new alloc metric: peak_bytes_allocated.
This is just max value of current_bytes_allocated seen.
11 years ago
Paul Sokolovsky
02de0c57d2
Add new alloc metric: current_bytes_allocated.
Unlike total_bytes_allocated, this tracks m_free()'s too.
11 years ago
Paul Sokolovsky
43f1c8080a
m_realloc: Account only allocation size difference in total_bytes_allocated.
11 years ago
Damien
732407f1bf
Change memory allocation API to require size for free and realloc.
11 years ago
Damien
8b3a7c2237
Fix func decls with no arguments: () -> (void).
11 years ago
Damien
429d71943d
Initial commit.
11 years ago