mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* kmem_cache_init ()
@ 2001-05-14  4:14 alad
  0 siblings, 0 replies; only message in thread
From: alad @ 2001-05-14  4:14 UTC (permalink / raw)
  To: linux-kernel



Hi,
     I was unable to understand the logic of the following sanity checks in
slab.c/kmem_cache_init ().

if (kmem_cache_diff(c_firstp,c_magic) != kmem_slab_diff(s_nextp,s_magic) ||
kmem_cache_diff(c_firstp,c_inuse) != kmem_slab_diff(s_nextp,s_inuse) ||
kmem_cache_offset(c_lastp) - ((unsigned long) kmem_slab_end((kmem_cache_t
*)NULL)) != kmem_slab_offset(s_prevp) || kmem_cache_diff(c_lastp,c_firstp) !=
kmem_slab_diff(s_prevp,s_nextp)) {
     /** offsets to the magic are incorrect **/
}

can someone throw some light behind the above logic

Thanks
Amol



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-05-14  4:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-14  4:14 kmem_cache_init () alad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®