Hi,
I'm having troubles with allocating memory. I need to declare a large buffer
(at least 60.000 entries of unsigned int16 type). The problem is, the
computer is quit simple (64 mb ram though) and the programming language
is... TurboC from a few centuries ago. The first thing I tried was to
declare an array like this:
unsigned int data[60000];
But, the maximum range is the maximum of a signed int16 so 60.000 is too
large. Declaring 2 arrays is possible but it gives problems because the
second array doesn't exactly start where the first array ends. So, I tried
it with malloc:
unsigned int *adress;
adress = malloc( sizeof( unsigned int ) * 60000 );
if (!adress)
{
printf("Cannot allocate memory!");
exit( 1 );
} else...
But that didn't work either, * 60000 is way too big, the maximum lies
somewhere between 1000 and 2000 (?). Maybe there's something wrong with my
code? Or does somebody knows a neat trick to reserve a large amount of
memory?
Greetings,
Rick