* Malloc returns non valid adress
@ 2000-07-28 14:02 Reni Pachernegg
0 siblings, 0 replies; only message in thread
From: Reni Pachernegg @ 2000-07-28 14:02 UTC (permalink / raw)
To: linuxppc-embedded
Hi everybody,
Im using the kernel version 2.14 on a special embedded ppc-system. The
livefs is copied from a flash-card to a ramdisk of 6MB. Total memory is
16 MB.
I found the following error:
When trying to alloc more memory than available alloc is returning an
adress as if everything was ok.
When trying to access the memory it hangs up with an infinite loop of
page fault exceptions.
I drag everything down to the function vm_enough_memory in mmap.c, where
the amount of free mem is calculated by adding buffermem >> PAGE_SHIFT
(later versions: buffermem_pages). Buffermem is exactly set to the size
of the ramdisk, which means the ramdisk is treated like any block buffer
whiche can be freed any time if needed.
When I set :
free = 0
instead of
free = buffermem
everything works ok and malloc returns NULL whenever there isnt enough
memory available.
I suppose this is neither the best solution nor the real reason for the
error.
Could anybody give me a hint where to search for it ro what to do?
regards Rene
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-07-28 14:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-07-28 14:02 Malloc returns non valid adress Reni Pachernegg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).