[redland-dev] Win32 DLL's / shared heap limitations effect on
Redland
Dave Beckett
dave.beckett at bristol.ac.uk
Tue Mar 8 15:45:00 GMT 2005
On Thu, 2005-03-03 at 07:25 -0800, Brian Holdsworth wrote:
> I found a past post from last August that eluded to a
> problem with running Redland on Windows. Like that
> poster, I am using all Redland libraries, which I have
> built as 3 separate DLL files. It mostly works fine,
> until I start to create and destroy multiple models
> using multiple instances of the parser objects.
> Without getting too specific, it seems that the three
> DLL's might not be playing nice together. I may be
> seeing what the earlier poster claimed, which is that
> the librdf.dll is trying to free heap memory that was
> allocated by the raptor.dll. This causes exceptions
> under Windows, as the required practice is to have the
> same DLL both allocate and free blocks. This is due
> to the fact that each DLL has its own heap manager.
Yeah, I heard about that.
> I would like to know if it is realistic to assume that
> the above is occurring - i.e. are the librdf and
> raptor libraries intertwined in this way?
They are intertwined but not intended to have this problem - i.e. this
is a bug if you find where it is happening.
> If so, I think I will pursue creating one giant
> librdf.dll for Windows to see if that solves the
> problem. Can anyone think of a reason not to solve it
> this way?
Because it's horrible? :)
Somebody else solved it by making rasqal and redland (librdf.dll) use
raptor's memory alloc/free routines so all the memory is alloced inside
raptor.dll. #define malloc raptor_alloc_memory and
#define free raptor_free_memory kinda thing.
Dave
More information about the redland-dev
mailing list