Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ksize(9) [centos man page]

KSIZE(9)						    Memory Management in Linux							  KSIZE(9)

NAME
ksize - get the actual amount of memory allocated for a given object SYNOPSIS
size_t ksize(const void * objp); ARGUMENTS
objp Pointer to the object DESCRIPTION
kmalloc may internally round up allocations and return more memory than requested. ksize can be used to determine the actual amount of memory allocated. The caller may use this additional memory, even though a smaller amount of memory was initially specified with the kmalloc call. The caller must guarantee that objp points to a valid object previously allocated with either kmalloc or kmem_cache_alloc. The object must not be freed during the duration of the call. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 KSIZE(9)

Check Out this Related Man Page

KCALLOC(9)						    Memory Management in Linux							KCALLOC(9)

NAME
kcalloc - allocate memory for an array. The memory is set to zero. SYNOPSIS
void * kcalloc(size_t n, size_t size, gfp_t flags); ARGUMENTS
n number of elements. size element size. flags the type of memory to allocate. DESCRIPTION
The flags argument may be one of: GFP_USER - Allocate memory on behalf of user. May sleep. GFP_KERNEL - Allocate normal kernel ram. May sleep. GFP_ATOMIC - Allocation will not sleep. May use emergency pools. For example, use this inside interrupt handlers. GFP_HIGHUSER - Allocate pages from high memory. GFP_NOIO - Do not do any I/O at all while trying to get memory. GFP_NOFS - Do not make any fs calls while trying to get memory. GFP_NOWAIT - Allocation will not sleep. GFP_THISNODE - Allocate node-local memory only. GFP_DMA - Allocation suitable for DMA. Should only be used for kmalloc caches. Otherwise, use a slab created with SLAB_DMA. Also it is possible to set different flags by OR'ing in one or more of the following additional flags: __GFP_COLD - Request cache-cold pages instead of trying to return cache-warm pages. __GFP_HIGH - This allocation has high priority and may use emergency pools. __GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail (think twice before using). __GFP_NORETRY - If memory is not immediately available, then give up at once. __GFP_NOWARN - If allocation fails, don't issue any warnings. __GFP_REPEAT - If allocation fails initially, try once more before failing. There are other flags available as well, but these are not intended for general use, and so are not documented here. For a full list of potential flags, always refer to linux/gfp.h. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 KCALLOC(9)
Man Page

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Tar: tape blocksize error

When trying to extract a tar file in HP-UX using tar -xvf command it exits with the following error :"Tar: tape blocksize error". Tar file is created using the following command with MKS toolkit(Unix Simulation Kit for Windows env) under Windows 2000 Professional: "$tar -cvf test.tar test.txt... (1 Reply)
Discussion started by: ramkumar
1 Replies

2. UNIX for Dummies Questions & Answers

Blocksize problem restoring file from tape

I was recently given the responsibility of the unix box at our work. Without much training, I now have to go back and restore a file from tape. I'm having some trouble with it. I'm getting an error with the blocksize. The part of the script that does the tar looks like this: tar cvfX... (11 Replies)
Discussion started by: citrowske
11 Replies

3. UNIX for Dummies Questions & Answers

How to change blocksize for in tar command

How can I change the blocksize in tar command? tar cvf test.tar backup.sh a backup.sh 1K If we need to set the blocksize to 20, how to do that? Please advise. Thank you. (10 Replies)
Discussion started by: KhawHL
10 Replies

4. UNIX for Advanced & Expert Users

tar: tape blocksize error

Hi, I have tar: tape blocksize error when launching # gunzip < TierDB.tar.gz |tar -xvf /data/ora/DREC tar: tape blocksize error Can you please help me ? It is urgent. Many thanks. (1 Reply)
Discussion started by: big123456
1 Replies

5. UNIX for Dummies Questions & Answers

tar: blocksize

Hi, When doing tar -xvf to untar, some tar versions display the blocksize: “tar: blocksize = 6” my goal is to avoid this message. One way of doing it is to specify the blocksize: tar -xvfb <tar_file> 6 Is there a setting in tar or a tar version to avoid this type of message without... (0 Replies)
Discussion started by: melanie_pfefer
0 Replies

6. UNIX for Dummies Questions & Answers

tar: blocksize = 0 - Error message?

Hi All, While viewing tar file using "tar tf file.tar" command, I have received "tar: blocksize = 0" message and while extracting a particular file from the same tar file (file.tar) I have received the same message and nothing is extracted. Above commands ran in a shell script so, I... (3 Replies)
Discussion started by: Tlogine
3 Replies

7. Solaris

Tar blockSize problem

Hi, i have got a tar file some 200MB big and i have ftp'ed the tar file over from one server to another but it does not seem to extract. its giving the following message: tar xvf saptar tar: blocksize = 2 Its the first time i used tar so I not got any ideas why its giving this message?... (2 Replies)
Discussion started by: scriptingmani
2 Replies

8. Linux

Linux Thread Stack Size pthread_attr_setstacksize

I have MultiThreaded Application in Linux. I am Setting the stack size using pthread_attr_setstacksize. The stack size i set is greter than PTHREAD_STACK_MIN i.e. 16384 bytes for my system. i am setting the stack size to 17408 bytes, and my application crashes due to insufficient stack size.... (1 Reply)
Discussion started by: Kedar Sabnis
1 Replies

9. Solaris

Limit: stacksize: Can't remove limit

Hi all, I'm using to Solaris machine. When I run a simple script this messenger come out:"limit: stacksize: Can't remove limit". Any one know the way to resolve this problem without reboot the machine? Thanks in advance. (3 Replies)
Discussion started by: Diabolist9
3 Replies