All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] RT_HEAP Problem
@ 2008-09-02  5:15 Yasser Kashfi
  2008-09-02  7:09 ` Gilles Chanteperdrix
  2008-09-03  6:24 ` Yasser Kashfi
  0 siblings, 2 replies; 12+ messages in thread
From: Yasser Kashfi @ 2008-09-02  5:15 UTC (permalink / raw)
  To: xenomai

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.


      



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-09-28 14:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-02  5:15 [Xenomai-core] RT_HEAP Problem Yasser Kashfi
2008-09-02  7:09 ` 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

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.