04-25-2005
Just tried this on a FreeBSD system. The addresses allocated are the same every time, as no other memory is allocated in the interval between program runs.
Also, the allocation is in the order that is specified in the program. i.e. string2 is allocated a starting address that is (12 bytes) before that of string1.
Why exactly are you interested in knowing the order of allocation of the variables?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How do I filter a long report, with the "STARTWORD" and "STOPWORD" as the variables to use in my awk command, to print the whole data segment that only contains the matched start/stop word?
awk '/start/, /stop/' file <- this prints the line, though I need to print the whole segment. Newline... (1 Reply)
Discussion started by: apalex
1 Replies
2. UNIX for Advanced & Expert Users
Hi,
as per my Unix admin all parameters in Ulimit are set to Unlimited in Hard limits but some how few profiles setting data segment part to limited number value. So i wanted to over write in my profile to set unlimited as hard limits are set to unlimited. What is the command to set ulimit for... (1 Reply)
Discussion started by: terala_s
1 Replies
3. UNIX for Advanced & Expert Users
Dear All,
How internally memory allocated when we declare the float data type.
how many bytes allocated for decimal and how many bytes for fraction.
kindly help me in this regards. (2 Replies)
Discussion started by: rajamohan
2 Replies
4. Solaris
Helloo Frd's,
How to clear uninitialized state in solaris 10 Services, the fallowing inetadm shows on my server. I tried svcadm clear, enable... not worked. And also i can't change to enable some of service on that.
sara4@root# inetadm
ENABLED STATE FMRI
disabled ... (6 Replies)
Discussion started by: madhu548
6 Replies
5. Programming
i wrote a tiny version of tail command using a large buffer statically allocated but, in a second time, i found another version in which i use a bidimensional array dynamically allocated.
here is the first version
/*my tiny tail, it prints the last 5 line of a file
*/
#include<stdio.h>... (4 Replies)
Discussion started by: lucasclaus
4 Replies
6. AIX
Hi guys,
Are all users authorised to modify the data segment and stack segment to unlimited on AIX?
Is a reboot required after giving ulimit -d unlimited?
Thanks
vandi (2 Replies)
Discussion started by: vandi
2 Replies
7. Shell Programming and Scripting
Hallo all i am trying to execute this script ...............
But this is throwing the error......
use of uninitialized value in subtraction in at icd_convert.pl line 156
use of uninitialized value in subtraction in at icd_convert.pl line 157
use of uninitialized value in subtraction in at... (1 Reply)
Discussion started by: suvenduperl
1 Replies
8. Programming
Hi,
Whether the following piece of code is placed in the read-only memory of code (text) segment or data segment?
char *a = "Hello";
I am getting two different answers while searching in google :( that's why the confusion is (7 Replies)
Discussion started by: royalibrahim
7 Replies
9. Solaris
Hi guys!
Could you tell me what's this figure about? (See the attached figure below.)
This is a representation of block allocation filesystem and extent allocation filesystem in Solaris.
Does this mean that in a block-based allocation, data are placed in individual blocks while in... (0 Replies)
Discussion started by: arah
0 Replies
10. Solaris
HI
I need help regarding telnet as I try to run the service it gives error
#svcs -xv svc:/network/telnet:default
svc:/network/telnet:default (Telnet server)
State: uninitialized since Wed May 15 16:46:41 2013
Reason: Restarter svc:/network/inetd:default is not running.
See:... (14 Replies)
Discussion started by: smazshah
14 Replies
LEARN ABOUT SUNOS
ssastringinit
SSAStringCpy(3SNMP) SNMP Library Functions SSAStringCpy(3SNMP)
NAME
SSAStringCpy, SSAStringInit, SSAStringToChar, SSAStringZero - Sun Solstice Enterprise Agent string helper functions
SYNOPSIS
cc [ flag ... ] file ... -lssasnmp [ library .. ]
#include <impl.h>
void *SSAStringZero(String *string);
int SSAStringInit(String *string, uchar_t *chars, int len, char *error_label);
int SSAStringCpy(String *string1, String *string2, char *error_label);
char *SSAStringToChar(String string);
DESCRIPTION
The SSAStringCpy() function makes a deep copy of string2 to string1. This function assumes that string1 has been processed by the SSAS-
tringZero() function. Memory is allocated inside the string1 and the contents of string2, not just the pointer, is copied to the string1.
If an error is encountered, an error message is stored in the error_label buffer.
The SSAStringInit() function copies the char array from chars to the string instance with the specified length len. This function assumes
that the string instance has been processed by the SSAStringZero() function or no memory is allocated inside the string instance. If an
error is encountered, an error message is stored in the error_label buffer.
The SSAStringToChar() function returns a temporary char array buffer for printing purposes.
The SSAStringZero() function frees the memory inside of the String instance, but not the string object itself.
RETURN VALUES
The SSAStringInit() and SSAStringCpy() functions return 0 if successful and -1 if error.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5)
SunOS 5.10 17 Dec 1996 SSAStringCpy(3SNMP)