Re: How to use realloc and free in an ISR



Ok, Thanks - will use the kLibAllocShareMem instead.

BR
Ole



"Andrew at Plextek (www.plextek.co.uk)" <ams@xxxxxxxxxxx> wrote in message
news:1165507853.059510.102010@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Ole,

ISR DLL's cannot call external DLLs so you can't allocate and free in
your ISR. If you are only allocating at startup then use the function
KLibAllocShareMem() in your driver init. This will give you a buffer
that is visible both to the ISR and the IST. You can then pass the
address of the buffer to the ISR by implementing an IOCTL (see the
GIISR.C example).

When you unload your ISR in driver deinit then call KLibFreeShareMem()
to free the buffer.

Remember, as a rule you should do as little as possible in an ISR and
let an IST do all the work for you.

Regards,
Andrew.



Ole wrote:

Cause of the lattency between ISR and IST - the alloc is only done during
setup - not during run.

Thanks
Ole

"Bruce Eitman [eMVP]" <beitman.nospam@xxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:%23EQ9n2gGHHA.4652@xxxxxxxxxxxxxxxxxxxxxxx
If you have time to do that in the ISR, why not move that to the IST?

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

"Ole" <ole@xxxxxxxxxx> wrote in message
news:OylIfGgGHHA.4712@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

How to use realloc and free in an ISR dll? or should I use some other
technique?

Thanks
Ole






.



Relevant Pages

  • Installable ISR - general questions
    ... Is it possible to use e.g. math functions like e.g. sinetc. in an ISR? ... Is it possible to use the IoControl of the ISR to pass parameters/data TO ... I understand that the KLibAllocShareMem can be used to allocate a common ... buffer of ISR and IST but what is the parameter nPages defined - what if I ...
    (microsoft.public.windowsce.platbuilder)
  • Re: How to use realloc and free in an ISR
    ... ISR DLL's cannot call external DLLs so you can't allocate and free in ... your ISR. ... This will give you a buffer ...
    (microsoft.public.windowsce.platbuilder)
  • Re: regarding ISR
    ... precautions i need to take care ?? ... you shouldn't use dynamic memory at all. ... You certainly should not allocate any during an ISR. ...
    (comp.arch.embedded)
  • Re: ISR to IST data passing example?
    ... KLibAllocShareMem() to create the buffer: ... you need the ISR to know about. ... Note that the data buffer static address is ... Implement in your installable ISR the function IOControl- see the ...
    (microsoft.public.windowsce.platbuilder)
  • RE: ISR and dynamicaly allocated memory
    ... Hum, i found myself the answers i think.... ... "KLibAllocShareMem" ... now, that mean that the program has to allocate memory, and not the ISR. ...
    (microsoft.public.windowsce.embedded.vc)