scsi_malloc() is really only to be used in allocating DMA-safe memory
for bounce buffers and other such structures.
scsi_init_malloc() is essentially just a wrapper around kmalloc(). If
you just need some general purpose memory, use kmalloc(). In the 2.3 series
kernel there is no longer a scsi_init_malloc() function - everything that
used it now uses kmalloc instead.
-Eric
----- Original Message -----
From: Stanley Wu <[EMAIL PROTECTED]>
To: scsi <[EMAIL PROTECTED]>
Sent: Thursday, March 23, 2000 4:28 PM
Subject: scsi_init_malloc and scsi_malloc
> My driver consistently hang after 3 or 4 successful
> scsi commands been issued. From the messages file,
> I'm getting hundreds of:
> magic (corrupt) (name=size-256)
> kmem_alloc: Bad slab magic (corrupt) .....
> And it looks like I'm running out of memory. Am not
> sure why because it does not look like my driver is
> allocating the memory.
>
> The driver isn't all that big, about 300K and I was
> just allocating 56 bytes buffer for the inquiry data.
> I use scsi_init_malloc with GFP_ATOMIC for allocating
> the data buffer. If I changed it to scsi_malloc, I'd
> then get segmentation fault instead of hang.
>
> Whats the difference between these two malloc? Which
> is the right one to use? Also, any rules on using
> GFP_ATOMIC and GFP_KERNEL?
>
> thanks.
>
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to [EMAIL PROTECTED]
>
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]