FreeDOS and Protected Mode (Users)
> > So am I wrong to believe that Protected Mode would give me more Heap
> space?
>
> I don't know TP, but it might very well be that stack and (local) heap have
> to share a 64 kB (DGROUP) segment in both real- and protected-mode.
Afaik TP has one segment for (static)data for all compilation units combined, both initialized and not, and stack and heap are both FAR and grow from opposite parts of the memory.
In protected mode there IIRC is some segment descriptor limit (8192?) though, so sometimes programs with very finely grained allocations don't gain from PM because they exchange the memory limitation for the segment descriptor one.
IIRC there are ways (and alternate dpmi/rtm's) to do something about it
I'm not that deep into the PM bits though, since I quickly moved to 32-bit afterwards.
The problems sound a bit strange though, since stack and heap combined should be like in the magnitude of 16MB in PM . One wonders if there is not some infinite recursion or datacorruption somewhere.
> However, it should be possible to additionally create "far heaps", which
> are not limited to 64 kB - I guess this should be possible in both real-
> and protected-mode. Of course, "far heaps" will return FAR ( == 4 byte )
> pointers.
Heap and stack are afaik both FAR. So afaik it is like the C "large" model. (Huge adds a data segment per compilation unit iirc, which is not supported by C)
Complete thread:
- FreeDOS and Protected Mode - paulrichards, 13.09.2011, 02:18 (Users)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- FreeDOS and Protected Mode - Rugxulo, 13.09.2011, 02:37
- FreeDOS and Protected Mode - paulrichards, 13.09.2011, 02:53
- FreeDOS and Protected Mode - Rugxulo, 13.09.2011, 05:53
- FreeDOS and Protected Mode - paulrichards, 13.09.2011, 06:48
- FreeDOS and Protected Mode - Rugxulo, 13.09.2011, 05:53
- FreeDOS and Protected Mode - paulrichards, 13.09.2011, 02:53
- FreeDOS and Protected Mode - Japheth, 13.09.2011, 07:12
- FreeDOS and Protected Mode - paulrichards, 13.09.2011, 08:24
- FreeDOS and Protected Mode - Japheth, 13.09.2011, 09:05
- FreeDOS and Protected Mode - paulrichards, 14.09.2011, 06:00
- FreeDOS and Protected Mode - Japheth, 14.09.2011, 11:03
- FreeDOS and Protected Mode - paulrichards, 14.09.2011, 11:17
- FreeDOS and Protected Mode - paulrichards, 14.09.2011, 11:12
- FreeDOS and Protected Mode - Japheth, 14.09.2011, 11:03
- FreeDOS and Protected Mode - paulrichards, 14.09.2011, 06:00
- FreeDOS and Protected Mode - Japheth, 13.09.2011, 09:05
- FreeDOS and Protected Mode - marcov, 13.09.2011, 13:35
- FreeDOS and Protected Mode - paulrichards, 14.09.2011, 04:22
- FreeDOS and Protected Mode - marcov, 14.09.2011, 11:13
- FreeDOS and Protected Mode - paulrichards, 14.09.2011, 11:42
- FreeDOS and Protected Mode - marcov, 16.09.2011, 12:52
- FreeDOS and Protected Mode - paulrichards, 16.09.2011, 14:01
- FreeDOS and Protected Mode - marcov, 16.09.2011, 17:41
- FreeDOS and Protected Mode - paulrichards, 16.09.2011, 14:01
- FreeDOS and Protected Mode - marcov, 16.09.2011, 12:52
- FreeDOS and Protected Mode - paulrichards, 14.09.2011, 11:42
- FreeDOS and Protected Mode - marcov, 14.09.2011, 11:13
- FreeDOS and Protected Mode - paulrichards, 14.09.2011, 04:22
- FreeDOS and Protected Mode - paulrichards, 13.09.2011, 08:24
- BP and Protected Mode - DOS386, 13.09.2011, 07:49
- BP and Protected Mode - paulrichards, 13.09.2011, 08:27
- BP and Protected Mode - marcov, 13.09.2011, 09:29
- BP and Protected Mode - paulrichards, 13.09.2011, 08:27
- FreeDOS and Protected Mode - Laaca, 13.09.2011, 20:19
- FreeDOS and Protected Mode - paulrichards, 14.09.2011, 04:09
- FreeDOS and Protected Mode - Rugxulo, 13.09.2011, 02:37
Mix view