Palmman wrote:
I need to store a large chunk in memory, but it seems I am unable to allocate more than 68k memory [It used to be 64k, right ?] to a handle. I wanted to know if there is any workaround for this ? I wanna send a large chunk of data through network in one go. I really dont wanna split them into 68k chunks and send more than once.
68k is just an abbreviation for 68000, as in the Motorola 68000 processor. The limit is 64K. If you want to allocate a larger amount, you can use MemGluePtrNew(). Of course, there is no guarantee that such a big chunk is available, but you can certainly try. Having said that, I'm not sure what network you're using, but most networks themselves have a limitation on the size of a packet, the MTU (maximum transmit unit). It depends on the type of network (on ethernet, it's commonly 1500 bytes; on gigabit ethernet with "jumbo" frames, it can be around 10,000 bytes; on PPP over dialup modem, it's often as small as 500 bytes; etc.). So, even if you could request that the network stack transmit 64K or more all at once, it will still have to break it up into smaller pieces before it sends it out. Having said that, there still can be some small advantage to sending it all at once. It might make your programming easier. Also, if you are sending through TCP with selective acknowledgements, it might actually result in less traffic. And it will certainly result in fewer system calls, which does mean a bit less wasted CPU time. - Logan -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
