Re: using more than 2 GB as a ram disk

Albert D. Cahalan (acahalan@cs.uml.edu)
Wed, 3 Feb 1999 20:33:56 -0500 (EST)


H. Peter Anvin writes:
> By author: "Albert D. Cahalan" <acahalan@cs.uml.edu>
>
>> The compiler must be hacked to use a 64-bit model, with pointers
>> normallized. The low 32 bits of a pointer would only hold 23 bits
>> of the address space; the other 13 bits are the segment. This hack
>> was fairly common for DOS software, not something I dreamed up.
>>
>> Yeah, this is slow. Every memory access needs a segment override.
>> The job gets done though: true flat-memory 64-bit software on ia32.
>
> Hardly "true flat-memory 64-bit"; it is a hacked 36-bit model where

The Alpha only has about 43 address bits; is the Alpha not 64-bit?

> you either store pointers in a non-flat format or normalize
> them every time;

Yes, exactly. For userspace, this is hidden by the compiler.

> once (or if) Intel adds more adds more address bits than 36
> you're hosed again.

At that point I expect a fix for the virtual address space too.
If not, you can extend the hack a bit. Don't use Electric Fence.

> Not to mention the cost to load segments for every reference.

The compiler may be able to reduce it a bit. Even if not, I have
yet to see another proposal that gets the job done on ia32.

In other words: I did it! I claim bragging rights to this abomination.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/