That depends on the bitness of your machine...if it is 32-bit then pointers will store 4 bytes and if it is 64-bit then pointers will store 8 bytes.
Quote:
Originally Posted by cyler
2. Am I correct in stating that memset is writing to memory that is not allocated to any of the 3 pointers ? Is it writing to memory in between the pointers ?
Depends on what memory locations a b and c are pointing to...just dont assume anything like that.
Quote:
Originally Posted by cyler
3. Are the 3 pointers contiguous in memory ?
Again dont assume anything...be satisfied with what the os gives you.
Quote:
Originally Posted by cyler
4. I only allocated 10 bytes for each pointer. So how can "a" be 73 chars long etc. ?
Hi all!
here is the file i am trying to sort :
GREIMBAJ00;BAN_CAV;Loader.sh;2003/06/13;17:04:04
GREIMBAJ00;PER_COT;Loader.sh;2003/06/13;17:04:16
GREIMBAJ00;PER_COT;Traitement.sh;2003/06/13;17:04:18
GREIMBAJ00;BAN_PAK;Loader.sh;2003/06/13;17:04:11... (3 Replies)
I have a program the will split a large file into smaller files. It works great. I, however, have problem of email these file out to other people:
I may have 1 or more files afer SPLIT
datafileaa
datafileab
datafileac
manually:
mailx -s "data" email@email.com<datafileaa
mailx -s... (5 Replies)
If one wants to get a start address of a array or a string or a block of memory via a function, there are at least two methods to achieve it:
(1) one is to pass a pointer-to-pointer parameter, like:
int my_malloc(int size, char **pmem)
{
*pmem=(char *)malloc(size);
if(*pmem==NULL)... (11 Replies)
Hi all,
I've got this question about using cp for copying multiples files from the same source directory to another directory, considering that my working directory ain't the same of the source directory.
Let me give you a simple example what I'm talking about:
Suppose the following files... (2 Replies)
Hi,
IS possible in ksh to make multiples menus?
For example:
My menu.
1)Option1
1.1)Option1.1
2.3)Option1.2
2)Option2
2.1)Option2.1
.
.
.
x)Exit
I've tried with case but no success.
Thanks in advance. (3 Replies)
Hi
I have this string with 3 seds..
cat /tmp/roletmp|sed "s/$role2del//" | sed "s/,,/,/" |sed "s/^,//" |sed 's/,$//'
How can I join these 3 seds in one?
regards
Israel. (3 Replies)
Hi Guys,
I wonder how can I determine when a given number is a multiple of another one in java. Let's say if I have 27 how can I determine whether is multiple of 5 using java programming. Thanks. (1 Reply)
hi guys
I got linux Centos 5.5 on grub I got the latest kernel and updates which I really don't know what I did and I lost a lot of modules and my system is not working properly
old kernel modules - this kernel is working fine
# lsmod
Module Size Used by
autofs4 ... (0 Replies)
Ques from newbie
I want to total column X from large number of files, and view totals for each file separately with the filename.
I have tried:
for i in `ls -1 *.pattern`; do cat "$i" | awk '{SUM += $4} END { printf("%8d\t%8d\n", $i,SUM) }'; done
does not work. appreciate your help (5 Replies)
Hi guys
I am newbie in using linux, how can i Separate file into multiples linux. I want the lines with same parent and id numbers print out into same files.
For example
Gm17 5135289 5136789 . Parent=533;ID=534;Name=Glyma17g07060 -
Gm17 5135289 5136789 . ... (2 Replies)
Discussion started by: grace_shen
2 Replies
LEARN ABOUT X11R4
getzoneid
getzoneid(3C) Standard C Library Functions getzoneid(3C)NAME
getzoneid, getzoneidbyname, getzonenamebyid - map between zone id and name
SYNOPSIS
#include <zone.h>
zoneid_t getzoneid(void);
zoneid_t getzoneidbyname(const char *name);
ssize_t getzonenamebyid(zoneid_t id, char *buf, size_t buflen);
DESCRIPTION
The getzoneid() function returns the zone ID of the calling process.
The getzoneidbyname() function returns the zone ID corresponding to the named zone, if that zone is currently active. If name is NULL, the
function returns the zone ID of the calling process.
The getzonenamebyid() function stores the name of the zone with ID specified by id in the location specified by buf. The bufsize argument
specifies the size in bytes of the buffer. If the buffer is too small to hold the complete null-terminated name, the first bufsize bytes of
the name are stored in the buffer. A buffer of size {ZONENAME_MAX} is sufficient to hold any zone name. If buf is NULL or bufsize is 0, the
name is not copied into the buffer.
RETURN VALUES
On successful completion, getzoneid() and getzoneidbyname() return a non-negative zone ID. Otherwise, getzoneidbyname() returns -1 and sets
errno to indicate the error.
On successful completion, the getzonenamebyid() function returns the buffer size required to hold the full null-terminated name. Otherwise,
it returns -1 and sets errno to indicate the error.
ERRORS
The getzoneidbyname() function will fail if:
EFAULT The name argument is non-null and points to an illegal address.
EINVAL A zone with the indicated name is not active.
ENAMETOOLONG The length of the name argument exceeds {ZONENAME_MAX}.
The getzonenamebyid() function will fail if:
EINVAL A zone with the specified ID is not active.
EFAULT The buf argument points to an illegal address.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO intro(2), chroot(2), malloc(3C), attributes(5), zones(5)SunOS 5.10 1 Nov 2004 getzoneid(3C)