[comp.windows.ms.programmer] Memory allocation

oneel@heawk1.rosserv.gsfc.nasa.gov ( Bruce Oneel ) (04/25/91)

Ok, last night I read Petzolds book, chap 7, on memory allocation.  He
said don't this
far char a[10000]
because it would use another data segment and it may get moved on you
causing problems or wouldn't get moved causing windows problems.
Then, near the end of the chapter he talks about how you don't have to
be so careful when running in protected mode.

Now, the protected mode is either standard or enhanced mode, right?
Can I do this in protected mode?  Is this a bad idea?  Since I'm using
BC++ real mode really isn't an option.

I'm asking all of this because I would like to write a quick and dirty
replacement for stdio to use windows so that I can recompile some
dos/unix c programs and run them under windows.  I know it won't be
pretty, but in TPW you replace the CRT unit with WINCRT and you don't
have to do anything else to make you dos turbo pascal application run
under windows.  From my point of view it's like getting an x-term
window under X.

Thoughts?

bruce
--
| Bruce O'Neel              | internet : oneel@heasfs.gsfc.nasa.gov|
| Code 664/STX              |     span : lheavx::oneel             |
| NASA/GSFC Bld 28/W281     |compuserve: 72737,1315                |
| Greenbelt  MD 20771       |  AT&Tnet : (301)-286-4585            |

Thats me in the corner, thats me in the spotlight, losin' my religion -- rem