* [uml-devel] [PATCH] syslets demo - fix malloc failure check
@ 2007-06-03 17:15 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2007-06-03 17:15 UTC (permalink / raw)
To: Zach Brown, Ingo Molnar; +Cc: LKML, uml-devel
Fix the stack malloc failure check.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
--
syslets/async-test-v5/sys.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-2.6/syslets/async-test-v5/sys.h
===================================================================
--- linux-2.6.orig/syslets/async-test-v5/sys.h 2007-05-31 13:29:57.000000000 -0400
+++ linux-2.6/syslets/async-test-v5/sys.h 2007-06-03 13:12:43.000000000 -0400
@@ -108,9 +108,10 @@ static u64 completion_ring[MAX_PENDING];
static unsigned long thread_stack_alloc()
{
- void *stack = malloc(THREAD_STACK_SIZE) + THREAD_STACK_SIZE;
+ void *stack = malloc(THREAD_STACK_SIZE);
assert(stack != NULL);
+ stack += THREAD_STACK_SIZE;
pr("allocated stack: %p\n", stack);
return (unsigned long)stack;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH] syslets demo - fix malloc failure check
@ 2007-06-03 17:15 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2007-06-03 17:15 UTC (permalink / raw)
To: Zach Brown, Ingo Molnar; +Cc: LKML, uml-devel
Fix the stack malloc failure check.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
--
syslets/async-test-v5/sys.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-2.6/syslets/async-test-v5/sys.h
===================================================================
--- linux-2.6.orig/syslets/async-test-v5/sys.h 2007-05-31 13:29:57.000000000 -0400
+++ linux-2.6/syslets/async-test-v5/sys.h 2007-06-03 13:12:43.000000000 -0400
@@ -108,9 +108,10 @@ static u64 completion_ring[MAX_PENDING];
static unsigned long thread_stack_alloc()
{
- void *stack = malloc(THREAD_STACK_SIZE) + THREAD_STACK_SIZE;
+ void *stack = malloc(THREAD_STACK_SIZE);
assert(stack != NULL);
+ stack += THREAD_STACK_SIZE;
pr("allocated stack: %p\n", stack);
return (unsigned long)stack;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-03 17:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-03 17:15 [uml-devel] [PATCH] syslets demo - fix malloc failure check Jeff Dike
2007-06-03 17:15 ` Jeff Dike
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.