[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] HEAD and GBC on Windows.
From: |
Mike Thomas |
Subject: |
[Gcl-devel] HEAD and GBC on Windows. |
Date: |
Wed, 14 Dec 2005 09:17:09 +1000 |
Hi Camm.
The long standing problem I face here is that GBC is not enabled in
o/main.c when the function malloc() is called to make space for a string
when raw_pre_gcl.exe is first started up during the build. (Either line
201 or 206 causes the problem.)
On Windows I have defined "malloc" to be "gcl_malloc" to stop GCL's
malloc being called by the C runtime before main() starts up (causing
the same GBC not enabled issue before main evn begins).
Apparently on Linux GBC is not called during those early calls to GCL's
malloc so I suppose that either my configuration is returning values
which are wrong, or not able to be dealt with by the GCL runtime as it
stands, or Linux is using a different malloc to the one used on Windows
or some other problem exists.
Here is some debugging output. Any comments would be appreciated as I
want to remove these problems ASAP (within currently unpredictable time
constraints).
================================================================
(gdb) r
Starting program: c:\cvs\head\gcl/unixport/raw_pre_gcl.exe
Breakpoint 2, gcl_malloc (size=5) at alloc.c:1569
1569 if (in_malloc)
(gdb) n
1571 in_malloc=1;
(gdb) n
1584 if (GBC_enable==0) {
(gdb) n
1585 if ( initflag ==0)
(gdb) n
1586 gcl_init_alloc();
(gdb) n
Breakpoint 3, gcl_init_alloc () at alloc.c:936
936 if (gcl_alloc_initialized) return;
(gdb) n
961 malloc_list = Cnil;
(gdb) n
962 enter_mark_origin(&malloc_list);
(gdb) n
966 set_maxpage();
(gdb) n
985 INIT_ALLOC;
;; NOTE Cam: allocate_heap() reserves heap but commits nothing.
;; Apparently commits are done by sbrk() / alloc_heap().
;; allocate_heap() lives in "o/unexnt.c"
allocate_heap: base 3000000, end 3d000000, reserved_heap_size 3a000000,
PAGESIZE 1000, MAXPAGE 40000, MAXCORE 42fff000, INIT_NRBDIV 9,
INIT_HOLEDIV 3, HOLEDIV 4
(gdb) n
988 holepage = CORE_PAGES/INIT_HOLEDIV;
(gdb) n
994 new_holepage = CORE_PAGES/HOLEDIV;
(gdb) n
995 nrbpage = CORE_PAGES/INIT_NRBDIV;
(gdb) n
998 fprintf ( stderr,
gcl_init_alloc: PAGESIZE 1000, MAXPAGE 40000, MAXCORE 42fff000,
CORE_PAGES 0, INIT_NRBDIV 9, INIT_HOLEDIV 3, HOLEDIV 4
(gdb) n
1011 alloc_page(-(holepage + nrbpage));
(gdb) p holepage
$1 = 0
(gdb) p new_holepage
$2 = 0
(gdb) p nrbpage
No symbol "nrbpage" in current context.
(gdb) n
Breakpoint 4, alloc_page (n=0) at alloc.c:105
105 e = heap_end;
(gdb) n
106 if (n >= 0) {
(gdb) p e
$3 = 0x3000000 <Address 0x3000000 out of bounds>
(gdb) n
107 if (n >=
(gdb) n
112 holepage = new_holepage + n;
(gdb) n
119 if(in_signal_handler)
(gdb) n
125 hole_overrun=1;
(gdb) n
126 GBC(t_relocatable);
(gdb)
=======================================================
Cheers
Mike Thomas.
- [Gcl-devel] HEAD and GBC on Windows.,
Mike Thomas <=
- RE: [Gcl-devel] HEAD and GBC on Windows., Mike Thomas, 2005/12/13
- RE: [Gcl-devel] HEAD and GBC on Windows., Mike Thomas, 2005/12/14
- RE: [Gcl-devel] HEAD and GBC on Windows., Mike Thomas, 2005/12/15
- RE: [Gcl-devel] HEAD and GBC on Windows., Mike Thomas, 2005/12/15
- RE: [Gcl-devel] HEAD and GBC on Windows., Mike Thomas, 2005/12/15