|
@@ -153,15 +153,14 @@ void M100_dump_routine(const char * const title, const char *start, const char *
|
153
|
153
|
* Return the number of free bytes in the memory pool,
|
154
|
154
|
* with other vital statistics defining the pool.
|
155
|
155
|
*/
|
156
|
|
-void free_memory_pool_report(char * const ptr, const uint16_t size) {
|
157
|
|
- int16_t max_cnt = -1;
|
158
|
|
- uint16_t block_cnt = 0;
|
|
156
|
+void free_memory_pool_report(char * const ptr, const int16_t size) {
|
|
157
|
+ int16_t max_cnt = -1, block_cnt = 0;
|
159
|
158
|
char *max_addr = NULL;
|
160
|
159
|
// Find the longest block of test bytes in the buffer
|
161
|
|
- for (uint16_t i = 0; i < size; i++) {
|
|
160
|
+ for (int16_t i = 0; i < size; i++) {
|
162
|
161
|
char *addr = ptr + i;
|
163
|
162
|
if (*addr == TEST_BYTE) {
|
164
|
|
- const uint16_t j = count_test_bytes(addr);
|
|
163
|
+ const int16_t j = count_test_bytes(addr);
|
165
|
164
|
if (j > 8) {
|
166
|
165
|
SERIAL_ECHOPAIR("Found ", j);
|
167
|
166
|
SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(addr));
|
|
@@ -225,8 +224,8 @@ void init_free_memory(char *ptr, int16_t size) {
|
225
|
224
|
SERIAL_ECHO(size);
|
226
|
225
|
SERIAL_ECHOLNPGM(" bytes of memory initialized.\n");
|
227
|
226
|
|
228
|
|
- for (uint16_t i = 0; i < size; i++) {
|
229
|
|
- if ((char)ptr[i] != TEST_BYTE) {
|
|
227
|
+ for (int16_t i = 0; i < size; i++) {
|
|
228
|
+ if (ptr[i] != TEST_BYTE) {
|
230
|
229
|
SERIAL_ECHOPAIR("? address : ", hex_address(ptr + i));
|
231
|
230
|
SERIAL_ECHOLNPAIR("=", hex_byte(ptr[i]));
|
232
|
231
|
SERIAL_EOL;
|