View Single Post
Old 23 July 2010, 05:20   #2
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
The far qualifier is a remnant from the early x86 architectures which used a segmented memory model. The M68K architecture has always used a flat memory model, and the far qualifier is useless here and has no effect on your pointers.

Does the code crash inside the malloc/calloc calls or because you don't check their return values? Or do you mean that you simply run out of memory when you use malloc/calloc instead of AllocMem? If AllocMem works, then why not just use that?

It's possible that GCC's standard library arbitrates calls to malloc/calloc to handle tiny allocations more efficiently, but I think an error of this kind wouldn't have slipped through.
Leffmann is offline  
 
Page generated in 0.08725 seconds with 11 queries