× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,

I'm writing some code to generate xml data, and it is stored, provisionally, on a pointer.

My question is: Which is the best place to hold the data - a pointer within a userspace or a data pointer within the program?

I will need to be able to generate data of varying sizes, from 100 bytes to 100k. However, each instance of the app will generate data of a consistent size: Instance 1 will generate 100 byte xml (inventory transactions), instance 2 will generate 32-64k xml (picktickets), etc...

I know I can allocate up to 16mb of memory to a data pointer, and similar sizes on a userspace. BUT what scenarios favour one over the other? Which is fastest to allocate? Which is fastest to reallocate? Which is the most flexible? Which is the most stable/reliable/resilient?

I know I can auto-extend a userspace, is this better than %realloc on a data pointer? I also know I can %realloc less memory to a data pointer, can you auto-decrease a userspace? Is it actually worthwhile reallocating less memory to a pointer, or should I only change it upwards?

Finally, I would not expect the memory I allocate to persist once the job has finished.

Again, your wise words are most welcome.

TIA

Larry Ducie



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.