[vorbis-dev] win32sdk shared memory issue

Michael Smith msmith at labyrinth.net.au
Mon Oct 8 08:23:46 PDT 2001



At 05:05 PM 10/8/01 +0200, you wrote:
>Hi vorbis-devs,
>
>I use the Ogg Vorbis libraries built from the win32sdk in winlame. Since the 
>rc2 DLL's are not functioning, I compiled them by myself. The apparent reason 
>is that some data arrays like _residue_P were not shared among DLLs.
>
>I looked at the code, and found that IMHO dirty hack in 
>vorbis/win32/src/shmmap*.h that maps the data arrays.
>
>Why not placing the data arrays in shared segments? 
>http://support.microsoft.com/support/kb/articles/Q100/6/34.ASP is a good 
>description how to achieve that. Just some #pragma's that could go into #if 
>defined(_MSC_VER) sections.

Yes, this way of doing things is stupid and horrible. Apparently, however,
it is neccesary. Blame microsoft. I believe (having not tested this, I can't
say whether it is true or not) that this approach was tried, and does not
correctly work under some versions of windows (NT5, for example).

The URL you cited supports the suggestion that this technique may randomly
fail to work depending on what else is linked into the program, and/or the
current phase of the moon (well, not really). Thus the ugly hack you see.

I think the current plan (possibly not implemented yet, I haven't looked)
is to replace the shared memory segments by simple memory allocations 
(strangely, this is apparently sufficient). 

Michael

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list