Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

lib$create_vm_zone

 
SOLVED
Go to solution
Ruslan R. Laishev
Super Advisor

lib$create_vm_zone

Hello, All!

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 ?



10 REPLIES 10
P Muralidhar Kini
Honored Contributor

Re: lib$create_vm_zone

Hi Ruslan,

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
Let There Be Rock - AC/DC
Ruslan R. Laishev
Super Advisor

Re: lib$create_vm_zone

Hello!

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.

P Muralidhar Kini
Honored Contributor

Re: lib$create_vm_zone

Hi Rusian,

>> 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
Let There Be Rock - AC/DC
Shriniketan Bhagwat
Trusted Contributor

Re: lib$create_vm_zone

Hi Ruslan,

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
Ruslan R. Laishev
Super Advisor

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

$