T.R | Title | User | Personal Name | Date | Lines |
---|
3803.1 | Dynamic Descriptors | MOLAR::ROBERTS | Keith Roberts - Network Management Applications | Fri Sep 25 1992 10:57 | 48 |
| Euan,
The ILV routines support Dynamic Descriptors. This allows you to specify
and initial size (guess) as to how much space you'll need. If you exceed
this, the ILV routines will automatically expand the buffer for you -
up to a maximum buffer size of 32k bytes.
Once you have done the Event Put - you may deallocate your buffers.
Dynamic Descriptors will be better documented in the v1.2 SRM
/keith
----------------------------------------------------------------------------
To use a Dynamic Descriptor:
MCC_T_CVR status;
MCC_T_Descriptor temp_dx;
MCC_T_Unsigned32 buf_len = { 512 };
:
temp_dx.mcc_w_maxstrlen = 0;
temp_dx.mcc_w_curlen = 0;
temp_dx.mcc_b_dtype = 0;
temp_dx.mcc_b_flags = 0;
temp_dx.mcc_b_ver = MCC_K_VER_DESCRIPTOR;
temp_dx.mcc_b_class = DSC_K_CLASS_D;
temp_dx.mcc_a_pointer = MCC_K_NULL_PTR;
temp_dx.mcc_a_link = MCC_K_NULL_PTR;
status = lib$sget1_dd( &buf_len, &temp_dx );
if (status & 1)
status = MCC_S_NORMAL;
}
if _GOOD(status) {
:
<<< ILV & Event Put Code >>>
:
}
if (temp_dx.mcc_a_pointer)
lib$sfree1_dd( &temp_dx );
|
3803.2 | You can also start with 32K | TAEC::LAVILLAT | | Mon Sep 28 1992 06:21 | 19 |
| Re .0 & .1:
>
> The ILV routines support Dynamic Descriptors. This allows you to specify
> and initial size (guess) as to how much space you'll need. If you exceed
> this, the ILV routines will automatically expand the buffer for you -
> up to a maximum buffer size of 32k bytes.
>
So, reading this, another (stupid ?) solution is starting with a 32K
buffer, which will be big enough for sure !
When you run on Ultrix with 3 Megs images, 32K is peanuts...
Regards.
Pierre.
|
3803.3 | but we've got an elephant to feed ... 8) | MOLAR::ROBERTS | Keith Roberts - Network Management Applications | Mon Sep 28 1992 10:41 | 17 |
| RE: .2
>> When you run on Ultrix with 3 Megs images, 32K is peanuts...
Pierre,
32k may be peanuts .. but we've got an elephant to feed ... 8)
Any way a Management Module can trim the fat on memory usage is very
important. A single over-eating MM - called hundreds of times via
Alarm Rules, Notifications, Historian & Exporter can quickly starve
to death on 3 Megs of memory.
Using Dynamic Descriptors can make your program more efficient and easier
to code. The v1.2 SRM better explains their use.
/keith
|
3803.4 | Yes | TAEC::LAVILLAT | | Mon Sep 28 1992 11:45 | 11 |
|
Re .3:
Keith,
You are right.
I would not recommend doing this in general, but sometimes it can help...
Pierre.
|