linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Reni Pachernegg <rene.pachernegg@apus.co.at>
To: linuxppc-embedded@lists.linuxppc.org
Subject: Malloc returns non valid adress
Date: Fri, 28 Jul 2000 16:02:44 +0200	[thread overview]
Message-ID: <39819284.865441FD@apus.co.at> (raw)


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/

                 reply	other threads:[~2000-07-28 14:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39819284.865441FD@apus.co.at \
    --to=rene.pachernegg@apus.co.at \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).