lkml.org 
[lkml]   [1997]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Filesize limitation
What's gcc's maximum array dimension? INT_MAX? So I can make a virtual
file that indexes an array of "file segments" (real files) of size up to
LONG_MAX (off_t)?

voff_t would have to be big, could be unsigned long long, for example, or
a BIGNUM. The index into the virtual file array would be voff_t value %
filesize (all "file segments" are one convenient size), and the offset
into the "file segment" would be the remainder, (value - ((value %
filesize) * filesize))).

Looks pretty straightforward to me, until 64bit types are standard for
libc offsets and sizes.

Regards, Clayton Weaver cgweav@eskimo.com (Seattle)


\
 
 \ /
  Last update: 2005-03-22 13:40    [from the cache]
©2003-2011 Jasper Spaans