Hartmut Birr schrieb:
This means colinux creates many pipes. Our npfs driver allocates the memory from non paged pool and possible it does not limit the size of the pipe buffer. I'm not sure if colinux creates to much pipes or if there is anywhere a bug which prevents from closing unused pipes (in colinux or ros).
Hi Gerard,
can you add my little patch and check how many pipes are created when colinux is started?
- Hartmut
M:\Sandbox\ros_work\reactos>set SVN_EDITOR=notepad
M:\Sandbox\ros_work\reactos>d:\programme\subversion\bin\svn.exe diff drivers\fs\np Index: drivers/fs/np/create.c =================================================================== --- drivers/fs/np/create.c (revision 14100) +++ drivers/fs/np/create.c (working copy) @@ -16,6 +16,8 @@ #define NDEBUG #include <debug.h>
+static ULONG PipeCount = 0; + /* FUNCTIONS *****************************************************************/
static PNPFS_PIPE @@ -451,6 +453,8 @@ }
InsertTailList(&DeviceExt->PipeListHead, &Pipe->PipeListEntry); + PipeCount++; + DPRINT1("PipeCount: %d\n", PipeCount); KeUnlockMutex(&DeviceExt->PipeListLock); }
@@ -460,9 +464,12 @@ if (Fcb->Data == NULL) { ExFreePool(Fcb); - if (NewPipe) { + /* + * FIXME: + * Lock the pipelist and remove the pipe from the list. + */ RtlFreeUnicodeString(&Pipe->PipeName); ExFreePool(Pipe); } @@ -592,6 +599,7 @@ RtlFreeUnicodeString(&Pipe->PipeName); KeLockMutex(&DeviceExt->PipeListLock); RemoveEntryList(&Pipe->PipeListEntry); + PipeCount--; KeUnlockMutex(&DeviceExt->PipeListLock); ExFreePool(Pipe); }