- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: IA64 / PASCAL Definition for LIB$GET/FREE_VM_6...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2006 12:32 AM
тАО07-18-2006 12:32 AM
The definition in PASCAL$LIB_ROUTINES.PAS contains the following definitions:
TYPE
lib$routines$$typ2 = ^$QUAD;
[ASYNCHRONOUS] FUNCTION lib$free_vm_64 (
number_of_bytes : $QUAD;
base_address : lib$routines$$typ2;
zone_id : $UQUAD := %IMMED 0) : INTEGER; EXTERNAL;
If I interprete this correctly, then baseaddress is a pointer to a $QUAD. Because no explizit mechanism ist specified, this pointer is passed per reference. So I think, the value passed as parameter is the 32bit address ("per ref mechanism") of a 32bit pointer pointing to an $QUAD. This is one indirection to much.
I used the following calling sequence which works.
VAR
myaddress : UNSIGNED64;
BEGIN
lib$free_vm_64 (
number_of_bytes := nnnnn,
base_address := %REF myaddress)
END
------------------------------------------
Is this definition really wrong or do I interprete the definition from the manual the wrong way ?
Martin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2006 12:46 PM
тАО07-18-2006 12:46 PM
Re: IA64 / PASCAL Definition for LIB$GET/FREE_VM_64
According to the Pascal Reference Manual, Table A-6 (footnote 5):
"By default, pointers on OpenVMS I64 and OpenVMS Alpha systems are 32 bits in size. However, the QUAD attribute can be used on pointer declarations to specify 64-bit pointers. See the HP Pascal for OpenVMS User Manual for more information."
So, I'd guess the definition should be:
TYPE
lib$routines$$typ2 = [QUAD] ^$QUAD;
to define a 64 bit pointer. The simplest way to determine exactly what's going on is to write a program declaring different variations of attributes and types, then compile with /SHOW=ALL and see the Structure Layout Listing to see the allocation size of the objects you've defined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2006 06:20 PM
тАО07-18-2006 06:20 PM
Re: IA64 / PASCAL Definition for LIB$GET/FREE_VM_64
The typoe $QUAD in the definition
lib$routines$$typ2 = [QUAD]^$QUAD;
is irrelevant. I.e.
lib$routines$$typ2 = [QUAD]^UNSIGNED;
would be correct to.
But in any case I think the (original) definition is incorrect. Maybe some gui from the pascal development will read this and comment.
It is not prior.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2006 02:34 AM
тАО07-20-2006 02:34 AM
SolutionIn summary
- the definitions are indeed incorrect in that they don't know about quad-pointers in Pascal
- we'll try to improve them post V8.3
- use the %REF foreign mechanism specifier to override the incorrect definition inside of PASCAL$LIB_ROUTINES.PAS/PEN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2006 05:40 AM
тАО07-20-2006 05:40 AM
Re: IA64 / PASCAL Definition for LIB$GET/FREE_VM_64
Thanks for the confirmation.
I'll try to get an offical case logged too so that HP can processe the issue in the normal ways.
Martin