[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem with GLOBALSZ=86016
From: |
Juan Raymundo Iglesias |
Subject: |
problem with GLOBALSZ=86016 |
Date: |
Fri, 03 Nov 2000 15:48:30 -0700 |
Hi,
The computer I am using is a Redhat 6.2 with linux 2.2.16:
%uname -a
Linux calpulalpan 2.2.16-3 #1 Mon Jun 19 19:11:44 EDT 2000 i686 unknown
The computer has 512MB of RAM memory:
total used free shared buffers
cached
Mem: 517088 112304 404784 67772 7024
59212
-/+ buffers/cache: 46068 471020
Swap: 0 0 0
I am using gprolog 1.2.3:
%gprolog
GNU Prolog 1.2.3
By Daniel Diaz
Copyright (C) 1999,2000 Daniel Diaz
I am using gprolog with a process needing lots of
memory, so I tried with the following stack environment variables:
export GLOBALSZ=86016
export LOCALSZ=32768
export TRAILSZ=8192
The problem is that when I start gprolog, the following message occurs:
%gprolog
Fatal Error: Memory allocation fault (calloc) in hash.c:116
It seems that this is not a shortage memory problem. I wrote the
following simple program that
allocates 256MB of memory without having any error:
main()
{
char *m = calloc(1024*1024*256, 1);
if (m == NULL) printf("memory error");
}
I modified Calloc_Check in misc.c to see if at some point gprolog was
allocating lots of memory:
char *
Calloc_Check(unsigned nb, unsigned size, char *src_file, int src_line)
{
char *m = calloc(nb, size);
if (m == NULL)
{
printf("while allocating %u bytes ", size);
Fatal_Error(ERR_ALLOC_FAULT, "calloc", src_file, src_line);
}
return m;
}
Surprisingly to me, the call to Calloc_Check that produced the crash was
very small,
just 4 bytes:
%gprolog
Fatal Error: Memory allocation fault (calloc) in hash.c:116
while allocating 4 bytes
Please let me know there is some way I can help to fix this problem.
Cheers ...
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- problem with GLOBALSZ=86016,
Juan Raymundo Iglesias <=