Really nice explanation.
Thanks!
Inaki.
At 09:40 05/05/00 -0700, you wrote:
Not quite.
Objects (an example: fileobjects) have two counts: a handle count and
pointer count. You can use the !object debugger extension to crack the
object header and see these.
pointer = handle + N
where N = the number of extra references (ObReferenceObject) placed on
the fileobject by kernel/system components. For a cached file, for
instance, you will typically see 1 handle count and 3 pointer count: the
handle, and a reference for each of the cache manager and memory manager
for the underlying cache setup.
The handle count indicates the number of entries in process handle
tables which refer to this precise object. Usually, of course, this is
- But you can duplicate a handle to that fileobject into other
processes. This increments the handle count.
Cleanup happens when handle count reaches zero.
Close happens when pointer count reaches zero.
-----Original Message-----
From: Inaki Castillo [mailto:xxxxx@lander.es]
Sent: Friday, May 05, 2000 7:02 AM
To: File Systems Developers
Subject: [ntfsd] RE: Close without IRQ_MJ_CLOSE
>The cleanup IRP is the result of the last (user)
>handle being closed.
Sorry but this is not true. CLEANUP comes for each CloseHandle.
If user has three handles three CLEANUPs come.
RE: [ntfsd] RE: Close without IRQ_MJ_CLOSE
Not quite.
Objects (an example: fileobjects) have two counts: a handle
count and pointer count. You can use the !object debugger extension to crack
the object header and see these.
pointer = handle + N
where N = the number of extra references
(ObReferenceObject) placed on the fileobject by kernel/system components.
For a cached file, for instance, you will typically see 1 handle count and 3
pointer count: the handle, and a reference for each of the cache manager and
memory manager for the underlying cache setup.
The handle count indicates the number of entries in process
handle tables which refer to this precise object. Usually, of course, this
is 1. But you can duplicate a handle to that fileobject into other
processes. This increments the handle count.
Cleanup happens when handle count reaches zero.
Close happens when pointer count reaches zero.
-----Original Message-----
From: Inaki Castillo [HREF=“mailto:xxxxx@lander.es”>mailto:xxxxx@lander.es]
Sent: Friday, May 05, 2000 7:02 AM
To: File Systems Developers
Subject: [ntfsd] RE: Close without IRQ_MJ_CLOSE
>The cleanup IRP is the result of the last (user)
>handle being closed.
Sorry but this is not true. CLEANUP comes for each
CloseHandle.
If user has three handles three CLEANUPs come.