[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

2568.0. "Q: Precisions needed on MCC Ultrix and DYNAMIC descriptors" by TAEC::LAVILLAT () Mon Mar 16 1992 13:01

Hello,

  I made some remarks to the note 2431.2 written by Ruth Kohls (and had no 
response) on DYNAMIC versus STATIC MCC descriptors.

  It appears today that we are using DYNAMIC descriptors in our (TeMIP) code
in some places where it is *very* difficult to estimate what the final buffer 
size will be.

  This code is mainly involved with ILV processing.

  So, can you confirm or deny that ILV routines on Ultrix do not support DYNAMIC
descriptors (even if the descriptors are allocated via mcc_alloc/mcc_calloc).


  We just want to be sure before starting breaking our code...


Thanks.

Pierre.
T.RTitleUserPersonal
Name
DateLines
2568.1yes.TOOK::KOHLSRuth KohlsMon Mar 16 1992 14:0019
>  So, can you confirm or deny that ILV routines on Ultrix do not support DYNAMIC
>descriptors (even if the descriptors are allocated via mcc_alloc/mcc_calloc).

Yes.  The exact same protocol is used on Ultrix.  The descriptors MUST
be set to Class D.  For Class S, you enlarge your buffers yourself.
In the Class D descriptor case, an buffer for "ilv_put"s will be extended 
by 512 bytes if it is too small, up to the limit of 32500 bytes.   A buffer
for "ilv_get"s will be extended by just enough to hold the datum.

Note that ILV does this, *not* the underlying mcc_asn1.

On Ultrix, the underlying memory routines use mcc_malloc, so
the confusion and leakage due to memory being allocated in one way and
freed in another is a VMS problem.

Ruth



2568.2Fine then.TAEC::LAVILLATTue Mar 17 1992 06:2712
re .1:

Ok. Thanks.

I am still a bit confused by "you MUST use DYNAMIC descr" and your previous
"you should avoid to use".

Anyway, you answered my question, I heard what I wanted to hear, thanks...

Regards.

Pierre.
2568.3potential leaks.TOOK::KOHLSRuth KohlsThu Mar 19 1992 19:1717
>I am still a bit confused by "you MUST use DYNAMIC descr" and your previous
>"you should avoid to use".

If you want ILV or some other routine to swap buffers out from underneath 
you, you MUST use CLASS D in your descriptors.

If you use Class D and then go and port your DECmcc Ultrix application to 
DECmcc VMS, without carefully and thoroughly changing how you allocate 
the buffers you want treated like this to use the VMS LIB$SGET... routines, 
you will leak memory.  

So, we _recommend_ you avoid using Class D.

Its a hot button, and has been for a while.

Ruth K.