03-18-2015
Thanks, good to know that in practice it is much more usable than the POSIX standard suggests...
10 More Discussions You Might Find Interesting
1. Programming
I made a liitle source about that..
BUt I got a trouble when making files'authority..
How can I display them??
p.s.) used struct stat .. (1 Reply)
Discussion started by: sangjinn
1 Replies
2. Shell Programming and Scripting
We have some unseen chars in unix, like '^T's, can be seen with 'cat -v' command.
Is there any way, with which, we can replace these ^T s with a space? (1 Reply)
Discussion started by: videsh77
1 Replies
3. UNIX for Dummies Questions & Answers
pls disregard got my question answered . as you can't do bold in vi (0 Replies)
Discussion started by: xzyan
0 Replies
4. UNIX for Dummies Questions & Answers
Folks;
I'm writing this as a part of a script:
echo "col1 hdg|col2hdg|col3hdg|"
How can i make these fields shows in Bold text? (10 Replies)
Discussion started by: moe2266
10 Replies
5. Shell Programming and Scripting
I was using the following bash command inside the emacs compile command to search C++ source code:
grep -inr --include='*.h' --include='*.cpp' '"' * | sed "/include/d" | sed "/_T/d" | sed '/^ *\/\//d' | sed '/extern/d'
Emacs will then position me in the correct file and at the correct line... (0 Replies)
Discussion started by: siegfried
0 Replies
6. Programming
I need tutorial on Make utility on Unix.
Any help or link appreciated.
many thanks
Mirko (3 Replies)
Discussion started by: mmipko
3 Replies
7. Shell Programming and Scripting
I know this should be simple, but I've been manning sed awk grep and find and am stupidly stumped :(
I'm trying to use sed (or awk, find, etc) to find 4 characters on the second line of a file.txt 44-47 characters in. I can find lots of sed things for lines, but not characters. (4 Replies)
Discussion started by: unclecameron
4 Replies
8. Shell Programming and Scripting
Is there any way to redirect characters in bold to .csv file using KSH. I need to open this csv in MS EXCEL.
thanks (4 Replies)
Discussion started by: param_it
4 Replies
9. Shell Programming and Scripting
Hi ,
Could you please guide me how to remove formatting (bold text) in a unix file?
vi editor showing like this...
^
Cat command showing like this...
tl21ss01
tl21ss02
tl21ss03 (6 Replies)
Discussion started by: suresh3566
6 Replies
10. UNIX for Beginners Questions & Answers
Hi Team,
I have a file a1.txt with data as follows.
dfjakjf...asdfkasj</EnableQuotedIDs><SQL><SelectStatement modified='1' type='string'><!
The delimiter string: <SelectStatement modified='1' type='string'><!
dlm="<SelectStatement modified='1' type='string'><!
The above command is... (7 Replies)
Discussion started by: kmanivan82
7 Replies
LEARN ABOUT LINUX
malloc_usable_size
MALLOC_USABLE_SIZE(3) Linux Programmer's Manual MALLOC_USABLE_SIZE(3)
NAME
malloc_usable_size - obtain size of block of memory allocated from heap
SYNOPSIS
#include <malloc.h>
size_t malloc_usable_size (void *ptr);
DESCRIPTION
The malloc_usable_size() function returns the number of usable bytes in the block pointed to by ptr, a pointer to a block of memory allo-
cated by malloc(3) or a related function.
RETURN VALUE
malloc_usable_size() returns the number of usable bytes in the block of allocated memory pointed to by ptr. If ptr is NULL, 0 is returned.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
+---------------------+---------------+---------+
|Interface | Attribute | Value |
+---------------------+---------------+---------+
|malloc_usable_size() | Thread safety | MT-Safe |
+---------------------+---------------+---------+
CONFORMING TO
This function is a GNU extension.
NOTES
The value returned by malloc_usable_size() may be greater than the requested size of the allocation because of alignment and minimum size
constraints. Although the excess bytes can be overwritten by the application without ill effects, this is not good programming practice:
the number of excess bytes in an allocation depends on the underlying implementation.
The main use of this function is for debugging and introspection.
SEE ALSO
malloc(3)
GNU
2015-03-02 MALLOC_USABLE_SIZE(3)