Mail Archives: cygwin/1999/04/29/08:28:37
Maybe. :)
More precisly, can `malloc' be used to allocate memory in cygwin
and `free' be used in VC to free the cygwin-allocated memory?
No -- they use different memory schemes.
However, that doesn't mean that you can't have one environment
allocate memory, and have the other free it -- you just can't
use the C runtime functions.
The Win32 functions CoTaskMemAlloc() and CoTaskMemFree() can
be used to allocate/free memory between 2 otherwise incompatible
memory schemes. I suspect that most of the other Win32 memory
functions (GlobalAlloc/GlobalFree, etc.) could also be used
to do this as well.
hth
- Jon
-----Original Message-----
From: Dominique MICOLLET <miko AT thetis DOT u-bourgogne DOT fr>
To: cygwin <cygwin AT sourceware DOT cygnus DOT com>
Date: Thursday, April 29, 1999 4:34 AM
Subject: malloc and free mixing in VC++ and cygwin
>Hello,
>
>I browse both FAQ, Users Manual and mailing list archive but was unable to
>find the answer to the following question :
>
>- is it possible to malloc a buffer within a cygwin procedure and free this
>buffer within a VC++ procedure ?
>- and inversely ?
>
>I suspect no, but I wish a confirmation.
>
> Cordialement
>
>Dominique MICOLLET Email : Dominique DOT Micollet AT u-bourgogne DOT fr
>Laboratoire LE2I Universite de Bourgogne
>9, Avenue Alain SAVARY BP 400 Tel : +33/(0)3-80-39-59-27
>21011 DIJON CEDEX FRANCE Tfx : +33/(0)3-80-39-68-69
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -