On 10 Apr 2011, at 00:20, <dhkblas...@zeelandnet.nl> <dhkblas...@zeelandnet.nl> 
wrote:

> I get strange errors when using GetMem. In my
> app I keep on allocating and freeing memory in a variable. At a certain
> moment I do keep getting a SIGSEGV on the GetMem call when trying to
> allocate exactly 128bytes. However allocating other sizes seems to work
> just fine. Is there some logical explanation what could be going on
> here?

Most likely it's memory corruption: writing into a freed memory block, writing 
outside the bounds of an allocated memory block, ... Compiling with -gh may 
help pinpoint it, and if not and you're on a Unix-based platform, you can try 
Valgrind.


Jonas

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to