PDA

Click to See Complete Forum and Search --> : Mem_mapped Segment???


Cmdr0Sunburn
Oct 15th, 2002, 04:38 PM
how do i make a MEM_MAPPED SEGMENT in msvc++????

parksie
Oct 15th, 2002, 04:49 PM
You don't have segments in 32-bit programming.

What are you trying to do? Map a file to memory?

Cmdr0Sunburn
Oct 15th, 2002, 05:11 PM
lol windows exes have segments, .data. text etc. neve rmind about this i got the question answerd by some one else

#pragma data_seg (".MYSEG")
int CrcAlreadyFilled = 0;
char CRCtable[256] = "";
#pragma data_seg()
//linker
/SECTION:.MYSEG,RWS

CornedBee
Oct 16th, 2002, 08:48 AM
Parksie: don't confuse memory segments with executable segments.

parksie
Oct 16th, 2002, 01:04 PM
Originally posted by CornedBee
Parksie: don't confuse memory segments with executable segments. I thought they were called sections. :confused:

$ man ld...

parksie
Oct 16th, 2002, 01:07 PM
Meh :rolleyes:

http://www.linuxbase.org/spec/gLSB/gLSB/specialsections.html

http://www.enchantedlearning.com/sparc/segments/segmentsexecutable.shtml

Oh well...

Cmdr0Sunburn
Oct 16th, 2002, 04:20 PM
lol the exe is in memory.... and memory_mapped explanes it all that its windows, and i said segment, windows doesnt have segments, so only thing left is exe segemnts, use your brain.(no offence)

CornedBee
Oct 16th, 2002, 04:24 PM
Protected mode and therefore windows still know memory segment, but not in the 16-bit way. They are an essential part of multitasking and permission handling.

Cmdr0Sunburn
Oct 16th, 2002, 04:31 PM
yes but that wasnt my Qusestion. and you cant access any other 32bit segs from ring3, and this didnt say vxd any where. but oh well i found my solution to my problem, and ill state more clearly next time. so just let it die.

CornedBee
Oct 16th, 2002, 04:39 PM
You said windows doesn't have segments, which is wrong.

parksie
Oct 16th, 2002, 07:11 PM
Originally posted by CornedBee
You said windows doesn't have segments, which is wrong. Depends on the type of segments. In real mode, the processor can run in segment:offset mode (16-bit segment and 20-bit offset, or something, I never really did much in 16-bit) but Windows (NT and up at least) tries to avoid it, so it runs in protected mode, whereby the processor and its MMU are responsible for generating a hardware interrupt if you access memory you're not entitled to.

Cmdr0Sunburn
Oct 16th, 2002, 08:01 PM
Originally posted by CornedBee
You said windows doesn't have segments, which is wrong.

you cant access segments from normal windows. so it almost like it doesnt even have any.
but a vxd or some ring0 you can, but normal windows is ring3.