The PIC18F6621 has 3840 byte of SRAM.
The project LST file shows plenty of memory available:
RAM used: 1039 (27%) at main() level
1214 (32%) worst case
I think I'm setting up correctly for using Malloc(0
From the project header file:
#include <18F6621.h>
#device *=16, adc=8
#pragma USE DYNAMIC_MEMORY
#include <STDLIBM.H>
In the help file for Malloc() the size parameter is stated to be an Integer !
Does anyone know if malloc is really limited to 255 bytes ?
from help file:
Parameters:
size is an integer representing the number of bytes to be allocated.
Guest
Reply from CCS tech support....
Posted: Tue Jun 01, 2004 5:08 pm
Change size_t variable in stddef.h to a long instead of an int. The malloc function uses the size_t variable to determine the return type.
Thanks
CCS Tech Support
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum