- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: lib$create_vm_zone
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
тАО06-20-2010 10:32 PM
тАО06-20-2010 10:32 PM
I have used the piece of code to creating VM Zones. It works as expected if:
[flags] = 0
and [extend-size] = 'Zone flags'
May be some one can help me to resolve this puzzle ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2010 11:33 PM
тАО06-20-2010 11:33 PM
Re: lib$create_vm_zone
If you look at the argument of LIB$CREATE_VM_ZONE as per documentation,
Parameter1 = Zone-id
Parameter2 = algorithm
Parameter3 = algorithm-argument
Parameter4 = flags
Parameter5 = extend-size
...
In your program, you are passing,
VMZoneFlags as 3rd parameter (it should be 4th parameter)
VMZsz as 4th parameter (it should be 3rd parameter).
...
check the following link for LIB$CREATE_VM_ZONE documentation -
http://h71000.www7.hp.com/doc/82final/5932/5932pro_005.html
-> Section "LIB$CREATE_VM_ZONE"
You need to have a look at the documentation of LIB$CREATE_VM_ZONE and
ensure that you are passing the parameters correctly.
Do these changes and let us know if the problem is solved.
Hope this helps.
Regards,
Murali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2010 11:47 PM
тАО06-20-2010 11:47 PM
Re: lib$create_vm_zone
Can I ask you using the has been attached VMZ.c to try to confirm that in your case all works as described in the docs ?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2010 11:59 PM
тАО06-20-2010 11:59 PM
Re: lib$create_vm_zone
>> Can I ask you using the has been attached VMZ.c to try to confirm that
>> in your case all works as described in the docs ?
Let me know what problem you are facing.
In your program, there is a piece of code within the "#if 0 ....".
Looks like, that portion of the code is not working as expected.
Is that correct ?
Is there a access violation with the program
or
extend size not getting set properly ?
I will try using your program.
Regards,
Murali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2010 12:01 AM
тАО06-21-2010 12:01 AM
Re: lib$create_vm_zone
I compiled and run your program on V8.3 IA64 with and without the flags and extend-size. But did not see any difference in output. Not sure, if I am doing anything wrong here. Please refer the attachment for the output.
Regards,
Ketan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2010 12:18 AM
тАО06-21-2010 12:18 AM
Re: lib$create_vm_zone
if ( !(1 & (status = lib$create_vm_zone(&VMZid, /* zone-id */
&VMZoneAlg, /* algorithm *
0, /* algorithm-argument */
&VMZsz, /* flags */
&VMZoneFlags, /* extend-size */
0, /* initial-size */
0, /* block-size */
0, /* alignment */
0, /* page-limit */
0, /* smallest-block-size */
0, /* zone-name */
0, /* get-page */
0))) ) /* free-page */
lib$signal(status);
$ run vmz
Zone Id = 00046800, Zone name = ""
Algorithm = LIB$K_VM_FIXED with block size of 117
Flags = 00000022
LIB$M_VM_GET_FILL0
LIB$M_VM_EXTEND_AREA
Initial size = 16 pages Current size = 0 pages in 0 areas
Extend size = 16 pages Page limit = None
Requests are rounded up to a multiple of 8 bytes,
naturally aligned on 8 byte boundaries
0 bytes have been freed and not yet reallocated
88 bytes are used for zone and area control blocks, or 100.0% overhea
---------------------------------
if ( !(1 & (status = lib$create_vm_zone(&VMZid, /* zone-id */
&VMZoneAlg, /* algorithm *
&VMZsz, /* algorithm-argument */
&VMZoneFlags, /* flags */
0, /* extend-size */
0, /* initial-size */
0, /* block-size */
0, /* alignment */
0, /* page-limit */
0, /* smallest-block-size */
0, /* zone-name */
0, /* get-page */
0))) ) /* free-page */
lib$signal(status);
$ run vmz
Zone Id = 00046800, Zone name = ""
Algorithm = LIB$K_VM_FIXED with block size of 34
Flags = 00000000
Initial size = 16 pages Current size = 0 pages in 0 areas
Extend size = 16 pages Page limit = None
Requests are rounded up to a multiple of 8 bytes,
naturally aligned on 8 byte boundaries
0 bytes have been freed and not yet reallocated
88 bytes are used for zone and area control blocks, or 100.0% overhead
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2010 12:55 AM
тАО06-21-2010 12:55 AM
Re: lib$create_vm_zone
Check the following link for sample program on LIB$CREATE_VM_ZONE -
http://www.eight-cubed.com/examples/framework.php?file=lib_vm.c
Hope this helps.
Regards,
Murali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2010 05:34 AM
тАО06-21-2010 05:34 AM
SolutionHere is the answer for you puzzle!
if ( !(1 & (status = lib$create_vm_zone(&VMZid, /* zone-id */
&VMZoneAlg, /* algorithm * <<<<<<
&VMZsz, /* algorithm-argument */
If you notice the above 3 lines carefully you will find
the character "/" missing after "*". So to solve your puzzle
you just have to put "/" after "*".
Cheers,
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2010 01:29 PM
тАО06-21-2010 01:29 PM
Re: lib$create_vm_zone
Reading your code in a colourising source editor, the bug stands out as the (inadvertently) commented out argument is a different colour from the rest. I'm using Notepad++ on a PC.
I thought C++ was capable of strong type checking arguments with appropriate template definitions? Doesn't HP provide them for LIB$ routines? That might also have helped detect the bug as it would have caused a mismatch between the VMZname string and another argument.
Language technology has progressed way beyond relying on eyeballing code for correctness of things like mismatched argument lists. For your own sanity, and the safety of your code, please use as much automated checking as possible!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2010 01:48 PM
тАО06-21-2010 01:48 PM
Re: lib$create_vm_zone
Around here [*], even defining __NEW_STARLET
doesn't buy you much in this case:
SYS$COMMON:[DECC$LIB.REFERENCE.SYS$STARLET_C]LIB$ROUTINES.H:
[...]
#define lib$create_vm_zone LIB$CREATE_VM_ZONE
#ifdef __NEW_STARLET
unsigned int lib$create_vm_zone(
unsigned int *zone_id,
__optional_params
);
#else /* __OLD_STARLET */
unsigned int lib$create_vm_zone(__unknown_params);
#endif /* #ifdef __NEW_STARLET */
[...]
[*]
alp $ cc /version
HP C V7.3-009 on OpenVMS Alpha V8.3