ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

memory efficient sub array


@jyang72211 wrote:

Each element of the 1D array contains a file path name.  For my application, the array won't be too big, just a 2000 at most.  However, I just want to know what's the best way to handle the memory. 


Keep in mind that building a new array of paths doesn't mean you're creating a new copy of every path.  You're just creating an additional pointer (4 or 8 bytes depending on whether you're on a 32 or 64 bit platform) to the path, unless you're modifying the path somehow before inserting it in the new array.

Message 11 of 12
(475 Views)

Just throwing this out there: if a contiguous space of memory were a concern (still not 100% sure from reading the above posts what you're looking for), you can try storing data in a queue and taking it out as you want.  If I'm not mistaken, a queue doesn't store the data contiguously in memory.  Not sure if this is what you're looking for, but it can be a help if a large single space of memory is the concern.

--------------------------------------------------

Nathan - Certified LabVIEW Developer
Message 12 of 12
(463 Views)