[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: [Mingw-users] Porting gcl to windows using mingw

From: Earnie Boyd
Subject: [Gcl-devel] Re: [Mingw-users] Porting gcl to windows using mingw
Date: Wed, 23 Jan 2002 11:25:31 -0500

Dan Stanger wrote:
> The gnu common lisp group is currently trying to build a working gcl on
> windows using mingw,
> and have a few questions.
> First, we have a simple test program, which follows, and the results:
> #define NULL_OR_ON_C_STACK(y) (((void *)(y)) < ((void *)0x230000))
> int e;
> main()
> {
>    int i;
>    printf("address of i was %x e was %x\n",&i,&e);
>    printf("macro of i was %x e was%x\n",
>    x();
> }
> x()
> {
>    int i;
>    printf("address of i was %x\n",&i);
>    printf("address of malloc was %x\n",malloc(100));
> }
> E:\>a.exe
> address of i was 22ff5c e was 403000
> macro of i was 1 e was
> 0
> address of i was 22ff3c
> address of malloc was 3f4830
> So the stack is going down, but the value returned from malloc is
> between the program,
> and the static variable e.  Our garbage collection is relying on a
> contigous area of memory.
> My questions are:
> 1. Is there some way that we can link so that malloc is above the static
> area?

Perhaps you should check the use of HeapCreate, HeapAlloc, etc set of
Win32 API functions.

> 2. Are the functions sbrk and brk available?

No.  Possibly you could emulate it.  I found a source reference
http://www.fs.net/cvs/sfs1/sfsmisc/mallock.C?annotate=1.1&sortby=rev for
an sbrk emulation.


Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]