Getting binary data linked into an executable
Michael Vannorsdel
mikevann at gmail.com
Tue Jun 3 02:56:00 PDT 2008
This is true; even though your data is in the binary image, it will
still take file I/O to get it into memory either at launch or when the
data is accessed. There's no way that I know that you can avoid file
I/O unless you can build the data array using immediate loads and bit
ops (probably via assembly) and storing each element to memory. In
essence, build the data array programatically at runtime.
On Jun 3, 2008, at 3:17 AM, James Montgomerie wrote:
> Perhaps I'm taking you too literally here and therefore stating the
> obvious, but if it's latency you're worried about, just because it's
> in the data section of the executable it doesn't mean that the disk
> will not be accessed to get it. The VM system may not page in from
> disk the pages containing your data until they're actually accessed
> by your code.
More information about the MacOSX-dev
mailing list