[geos-devel] An Immodest Proposal

Charlie Savage cfis at savagexi.com
Tue Sep 30 00:30:53 EDT 2008


Paul,

> It turns out it is a quite small modification, and works pretty well:
> 
> http://trac.osgeo.org/geos/attachment/ticket/208/memdiff.patch
> 
> My patch adds the ability to override, and also has some printfs to
> show what is happening. When the overridden allocator is called
> without the runtime callback set, it prints "std alloc" and when it's
> called with the callback set, it prints "geos alloc".

If you're going to run into any problems it will be on Windows, since 
its so fussy about memory being allocated/deallocated from the same 
runtime library's heap.  Looks like your solution does that.  But I 
wonder if there will be issues accessing the postgresql allocated memory 
from GEOS - like what happens if you call sizeof and such?  My guess it 
works, but would be good to run a debug build of geos/postgis - built 
with VC++2005 or 2008 since it adds various assertions to check these 
sorts of things.

Charlie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20080929/d21aceeb/smime-0001.bin


More information about the geos-devel mailing list