09-22-2008
question on allocate memory
Thx.
I debugged the code a bit. And Seems the complex.h is used inherently in the gcc compiler on SUN and this is not the bug.
Another potential one is on allocating memory for a struct ALOS_ORB, which contain another struct. Can anyone tell me how to allocate this by malloc ?
What I did is orb = malloc(sizeof(struct ALOS_ORB));
and I've no idea how to contain another one.
struct ALOS_ORB {
int itype;
int nd;
int iy;
int id;
double sec;
double dsec;
struct ORB_XYZ *points;
};
struct ORB_XYZ {
double pt;
double px;
double py;
double pz;
double vx;
double vy;
double vz;
};
4 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Dear Sun gurus,
I have Sun Fire V240 server with its StorEdge 3300 disk-array. Following are its disks appeared in format command. I have prepared its partitions thru format and metainit & metattach (may be i have made wrong steps, causing the errors below because I have done thru some document... (1 Reply)
Discussion started by: shafeeq
1 Replies
2. UNIX for Dummies Questions & Answers
Hey there,
I am starting a Computer Science Foundation year at the end of this month and am trying to get a little bit ahead of the game. I have always wanted to learn Unix and am currently struggling with creating a boot disc to run Solaris (I have chosen to study this) from as opposed to... (0 Replies)
Discussion started by: Jupiter
0 Replies
3. Solaris
I am new to Sun.
I brought Sun Fire 280R to practice UNIX. What are the requirements for the monitor/CRT? Will it burn out old non-Sun CRTs? Does it need LCD monitor?
Thanks. (3 Replies)
Discussion started by: bramptonmt
3 Replies
4. Solaris
Hi all,
I have application running on sun server T5440 4x8x1.4 GHz, 64 GB RAM, application running very slow though load average too low. when I install my application on another server SUN M3000 (One CPU 1x8x2.5GHz, 8GB RAM), application run smoothly.
Here is my server T5440 info:
... (6 Replies)
Discussion started by: insatiable1610
6 Replies
csin(3M) Mathematical Library Functions csin(3M)
NAME
csin, csinf, csinl - complex sine functions
SYNOPSIS
cc [ flag... ] file... -lm [ library... ]
#include <complex.h>
double complex csin(double complex z);
float complex csinf(float complex z);
long double complex csinl(long double complex z);
DESCRIPTION
These functions compute the complex sine of z.
RETURN VALUES
These functions return the complex sine value.
ERRORS
No errors are defined.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
casin(3M), complex.h(3HEAD), attributes(5), standards(5)
SunOS 5.10 1 Sep 2002 csin(3M)