login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
September
»
15
Re: [RFC v5][PATCH 2/8] General infrastructure for checkpoint restart
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Dave Hansen
Subject:
Re: [RFC v5][PATCH 2/8] General infrastructure for checkpoint restart
Date: Monday, September 15, 2008 - 11:02 am
On Sat, 2008-09-13 at 19:06 -0400, Oren Laadan wrote:
quoted text
> > +void *cr_hbuf_get(struct cr_ctx *ctx, int n) > +{ > + void *ptr; > + > + BUG_ON(ctx->hpos + n > CR_HBUF_TOTAL); > + ptr = (void *) (((char *) ctx->hbuf) + ctx->hpos); > + ctx->hpos += n; > + return ptr; > +}
All of the casting here is unnecessary. 'void *' behaves like 'char *' when you do arithmetic on it. I really do detest having a memory allocator BUG_ON() when it runs out of space. -- Dave --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[RFC v5][PATCH 0/9] Kernel based checkpoint/restart
, Oren Laadan
, (Sat Sep 13, 4:05 pm)
[RFC v5][PATCH 1/8] Create syscalls: sys_checkpoint, sys_r ...
, Oren Laadan
, (Sat Sep 13, 4:05 pm)
[RFC v5][PATCH 2/8] General infrastructure for checkpoint ...
, Oren Laadan
, (Sat Sep 13, 4:06 pm)
[RFC v5][PATCH 3/8] x86 support for checkpoint/restart
, Oren Laadan
, (Sat Sep 13, 4:06 pm)
[RFC v5][PATCH 4/8] Dump memory address space
, Oren Laadan
, (Sat Sep 13, 4:06 pm)
[RFC v5][PATCH 5/8] Restore memory address space
, Oren Laadan
, (Sat Sep 13, 4:06 pm)
[RFC v5][PATCH 6/8] Checkpoint/restart: initial documentation
, Oren Laadan
, (Sat Sep 13, 4:06 pm)
[RFC v5][PATCH 7/8] Infrastructure for shared objects
, Oren Laadan
, (Sat Sep 13, 4:06 pm)
[RFC v5][PATCH 8/8] Dump open file descriptors
, Oren Laadan
, (Sat Sep 13, 4:06 pm)
[RFC v5][PATCH 9/9] Restore open file descriprtors
, Oren Laadan
, (Sat Sep 13, 4:06 pm)
[RFC v5][PATCH 9/9] Restore open file descriprtors
, Oren Laadan
, (Sat Sep 13, 4:22 pm)
Re: [RFC v5][PATCH 8/8] Dump open file descriptors
, Bastian Blank
, (Sun Sep 14, 2:51 am)
Re: [RFC v5][PATCH 8/8] Dump open file descriptors
, Oren Laadan
, (Sun Sep 14, 8:40 am)
Re: [RFC v5][PATCH 2/8] General infrastructure for checkpo ...
, Dave Hansen
, (Mon Sep 15, 10:54 am)
Re: [RFC v5][PATCH 2/8] General infrastructure for checkpo ...
, Dave Hansen
, (Mon Sep 15, 10:59 am)
Re: [RFC v5][PATCH 2/8] General infrastructure for checkpo ...
, Dave Hansen
, (Mon Sep 15, 11:00 am)
Re: [RFC v5][PATCH 2/8] General infrastructure for checkpo ...
, Dave Hansen
, (Mon Sep 15, 11:02 am)
Re: [RFC v5][PATCH 2/8] General infrastructure for checkpo ...
, Oren Laadan
, (Mon Sep 15, 11:52 am)
Re: [RFC v5][PATCH 2/8] General infrastructure for checkpo ...
, Dave Hansen
, (Mon Sep 15, 12:13 pm)
Re: [RFC v5][PATCH 5/8] Restore memory address space
, Dave Hansen
, (Mon Sep 15, 12:14 pm)
Re: [RFC v5][PATCH 6/8] Checkpoint/restart: initial docume ...
, Serge E. Hallyn
, (Mon Sep 15, 1:26 pm)
Re: [RFC v5][PATCH 1/8] Create syscalls: sys_checkpoint, s ...
, Serge E. Hallyn
, (Mon Sep 15, 1:28 pm)
Re: [RFC v5][PATCH 2/8] General infrastructure for checkpo ...
, Serge E. Hallyn
, (Mon Sep 15, 2:15 pm)
Re: [RFC v5][PATCH 3/8] x86 support for checkpoint/restart
, Serge E. Hallyn
, (Mon Sep 15, 2:31 pm)
Re: [RFC v5][PATCH 2/8] General infrastructure for checkpo ...
, Bastian Blank
, (Tue Sep 16, 5:27 am)
Re: [RFC v5][PATCH 8/8] Dump open file descriptors
, Dave Hansen
, (Tue Sep 16, 8:54 am)
Re: [RFC v5][PATCH 7/8] Infrastructure for shared objects
, Dave Hansen
, (Tue Sep 16, 9:48 am)
Re: [RFC v5][PATCH 8/8] Dump open file descriptors
, Dave Hansen
, (Tue Sep 16, 9:55 am)
Re: [RFC v5][PATCH 7/8] Infrastructure for shared objects
, Serge E. Hallyn
, (Tue Sep 16, 1:54 pm)
Re: [RFC v5][PATCH 7/8] Infrastructure for shared objects
, Oren Laadan
, (Tue Sep 16, 2:36 pm)
Re: [RFC v5][PATCH 7/8] Infrastructure for shared objects
, Serge E. Hallyn
, (Tue Sep 16, 3:09 pm)
Re: [RFC v5][PATCH 8/8] Dump open file descriptors
, Serge E. Hallyn
, (Tue Sep 16, 4:03 pm)
Re: [RFC v5][PATCH 9/9] Restore open file descriprtors
, Serge E. Hallyn
, (Tue Sep 16, 4:08 pm)
Re: [RFC v5][PATCH 9/9] Restore open file descriprtors
, Oren Laadan
, (Tue Sep 16, 5:11 pm)
Re: [RFC v5][PATCH 9/9] Restore open file descriprtors
, Serge E. Hallyn
, (Tue Sep 16, 9:56 pm)
Re: [RFC v5][PATCH 6/8] Checkpoint/restart: initial docume ...
, MinChan Kim
, (Tue Sep 16, 11:23 pm)
Re: [RFC v5][PATCH 4/8] Dump memory address space
, MinChan Kim
, (Tue Sep 16, 11:48 pm)
Re: [RFC v5][PATCH 7/8] Infrastructure for shared objects
, MinChan Kim
, (Wed Sep 17, 12:31 am)
Re: [RFC v5][PATCH 0/9] Kernel based checkpoint/restart
, Serge E. Hallyn
, (Wed Sep 17, 7:16 am)
Re: [RFC v5][PATCH 8/8] Dump open file descriptors
, Dave Hansen
, (Mon Sep 22, 8:31 am)
Re: [RFC v5][PATCH 9/9] Restore open file descriprtors
, Dave Hansen
, (Mon Sep 22, 9:02 am)
Re: [RFC v5][PATCH 0/9] Kernel based checkpoint/restart
, Serge E. Hallyn
, (Wed Sep 24, 2:42 pm)
Re: [RFC v5][PATCH 0/9] Kernel based checkpoint/restart
, Cedric Le Goater
, (Thu Sep 25, 5:58 am)
Re: [RFC v5][PATCH 0/9] Kernel based checkpoint/restart
, Oren Laadan
, (Wed Oct 8, 2:59 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth
Linux Kernel Mailing List
ixbge: remove TX lock and redo TX accounting.
Linux Kernel Mailing List
ixgbe: fix several counter register errata
Linux Kernel Mailing List
b43: fix build with CONFIG_SSB_PCIHOST=n
Linux Kernel Mailing List
9p: block-based virtio client
linux-netdev
:
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
David Daney
[PATCH 5/7] Staging: Octeon Ethernet: Convert to NAPI.
Wolfgang Grandegger
[PATCH net-next v4 1/3] can: mscan: fix improper return if dlc < 8 in start_xmi...
Amit Kumar Salecha
[PATCHv3 NEXT 2/2] NET: Add Qlogic ethernet driver for CNA devices
openbsd-misc
:
Theo de Raadt
Re: Old IPSEC bug
Tomáš Bodžár
Problem with vpnc connection - check group password !
Insan Praja SW
Mandoc Compiling Error
Carl Roberso
Re: Cannot change MTU of carp interface?
Richard Daemon
Re: booting openbsd on eee without cd-rom
Colocation donated by:
Syndicate