View topic - malloc qnx4

malloc qnx4

For the old QNX2 and QNX4 RTOS

malloc qnx4

Postby gubbe » Tue Jan 30, 2007 4:35 pm

Hi,
Anyone have an idea why the maxium i can malloc with QNX4 is 30.2 Megabytes? I tried to use -ml (large memory model) but it didnt seem to make any difference. The PC has 256 meg, and I have used ramtrap to detect as much as QNX4 can..
gubbe
Active Member
 
Posts: 82
Joined: Mon Dec 13, 2004 9:18 am

RE: malloc qnx4

Postby mario » Tue Jan 30, 2007 5:12 pm

I'm not aware of such limit ( large model in 32 bits doesn't make any difference). Just tried 100Meg and that work just fine.

Are you talking about one malloc of 30 megs or a bunch of smallers mallocs which amount to 30.2 Meg.

You may have a problem with heap partioning though.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

RE: malloc qnx4

Postby gubbe » Wed Jan 31, 2007 7:59 am

Hi , I am trying to malloc one large > 30.2 Megabyte memory (for obscure reasons). If i understand correctly so should malloc be able to allocate up to size_t size memory ranges?
(A bit of background I have written a program that watches out for SEUs in DRAM).
gubbe
Active Member
 
Posts: 82
Joined: Mon Dec 13, 2004 9:18 am

RE: malloc qnx4

Postby mario » Wed Jan 31, 2007 4:00 pm

Don't know what SEU's stands for?

It can't go as high as size_t because some memory is needed by the system and other programs. That being said it's possible you can't malloc high number because the memory is too fragmented. Instead do a numbers of smaller malloc.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am


Return to QNX2 and QNX4

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron