"Robert G. Brown" <[EMAIL PROTECTED]> writes: > On Tue, 26 Aug 2008, Perry E. Metzger wrote: >> "Robert G. Brown" <[EMAIL PROTECTED]> writes: >>> I think that matrix allocation per se is contiguous because of how and >>> where it occurs at the compiler level. Immediate matrices allocated >>> like a[10][10] are just translated into displacements relative to the >>> stack pointer, are they not? >> >> It depends. You're not guaranteed per se that they'll be allocated on >> the stack, though in practice they are. > > Unless they are really large, I imagine. I'm not sure what the stack > limits are (I don't code to ever stress them) but I'm sure there are > some.
In the kernel, stack limits are very tight for a variety of reasons. In userland, there isn't in theory much of a limit other than available RAM (and of course address space), though in practice the ulimits are set pretty low. That's easily fixed, naturally. Still, the right decision on what to use usually depends on what you are doing, as always. >>> Global/external matrices at the a[10][10] >>> are prespecified in the data segment of the program, >> >> Depending on the particular OS. Certainly that's the usual model. > > What OS's do it some other way? I'm just curious. Is this a kernel > feature or a compiler feature? Kernel. Compilers have to live with what the OS model for a process looks like. (Actually, more to the point, the linker and back end tools have to live with it, though in practice that also means the compiler has to know a little.) There are a load of weird things out there that don't look like this. Have a gander at Palm's operating system for their handhelds sometime -- or the original Mac OS. Perry -- Perry E. Metzger [EMAIL PROTECTED] _______________________________________________ Beowulf mailing list, Beowulf@beowulf.org To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf