From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,2b585bfb397fe81e X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-08-07 07:02:42 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!nntp-relay.ihug.net!ihug.co.nz!news.compaq.com!news.cpqcorp.net!53ab2750!not-for-mail From: "Ed Vogel" Newsgroups: comp.unix.tru64 References: Subject: Re: how to determine the size of dynamic array?? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: <6_sYa.1689$K_4.849@news.cpqcorp.net> Date: Thu, 07 Aug 2003 14:02:42 GMT NNTP-Posting-Host: 16.28.64.73 X-Complaints-To: abuse@HP.com X-Trace: news.cpqcorp.net 1060264962 16.28.64.73 (Thu, 07 Aug 2003 07:02:42 PDT) NNTP-Posting-Date: Thu, 07 Aug 2003 07:02:42 PDT Organization: Hewlett-Packard Company Xref: archiver1.google.com comp.unix.tru64:10534 If by "dynamic array" you mean what the C Standard calls "variable length array", the C compiler on Tru64 has this support, and you just use the sizeof() operator to get the size of the array. For example: int x = 5; main() { int a[x]; /* Declare a varible length array */ printf("size is %d\n",sizeof(a)); } will emit: "size is 20" when run. Ed Vogel HP C Engineering "Tylenol" wrote in message news:becbc481.0308061530.22556518@posting.google.com... | Hi All: | Does anyone have ideas how to determine the size of dynamic array? I | know MSVC have a function called "_msize()" which doing this kind of | job. However, I am not sure on Unix Tru64 have a similar function or | not. The most similar function I found is "mallocate()" but this | function returns the array size is always larger than original | requested size of array. Any function in Unix Tru64 doing the same job | as "_msize()"? Please Help!!! | | Thanks in advance | Harley