All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yasser Kashfi <yasser_kashfi@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-core] RT_HEAP Problem
Date: Mon, 1 Sep 2008 22:15:44 -0700 (PDT)	[thread overview]
Message-ID: <971398.39540.qm@domain.hid> (raw)

Hi
I have a problem with rt_heap; I write a simple program:
############################
#include <sys/mman.h>
#include <native/heap.h>

RT_HEAP M_HEAP;
int main(void) {
	int ret;
	int * tmp;
	
	/* no memory-swapping for this programm */
	mlockall(MCL_CURRENT | MCL_FUTURE);
	
	ret = rt_heap_create(&M_HEAP, "M_HEAP", 5 * 1024 * 1024 , 0);
	if (ret) {
		fprintf(stderr, "fail to create heap, code %d\n", ret);
		return ret;
	}

	sleep(10);

	ret = rt_heap_delete(&M_HEAP);
	if (ret) {
		fprintf(stderr, "fail to delete heap, code %d\n", ret);
		return;
	}
	
	return 0;

}
#######################
this program previously worked on another PC. but now when I execute it on the new PC, It cause the kernel panic ( Unable to handle null pointer reference ...). same kernel is run on two PC, and not seems any difference.  but now I print memory status (/proc/meminfo). a huge difference is found! 
in first pc ( that program worked ) total vmalloc = totol memory = 510 M and highmem = 0, but on second pc ( that kernel panic ) total vmalloc = 119M but total memory = 1 G and highmem = 122.
have everyone any idea? 

I glade to see your comments.


      



             reply	other threads:[~2008-09-02  5:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-02  5:15 Yasser Kashfi [this message]
2008-09-02  7:09 ` [Xenomai-core] RT_HEAP Problem Gilles Chanteperdrix
2008-09-03  6:24 ` Yasser Kashfi
2008-09-03  7:55   ` Gilles Chanteperdrix
2008-09-03  8:59   ` Gilles Chanteperdrix
2008-09-06 13:08     ` Yasser Kashfi
2008-09-06 13:16       ` Gilles Chanteperdrix
2008-09-07 13:21         ` Yasser Kashfi
2008-09-07 15:36           ` Gilles Chanteperdrix
2008-09-22 20:55             ` Gilles Chanteperdrix
2008-09-25 12:33               ` Gilles Chanteperdrix
2008-09-28 14:04                 ` Yasser Kashfi

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=971398.39540.qm@domain.hid \
    --to=yasser_kashfi@domain.hid \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.