From: I Reid (eonu24@castle.ed.ac.uk)
Date: 07/20/92


From: eonu24@castle.ed.ac.uk (I Reid)
Subject: /dev/mem: too many oepn files (HELP)
Date: 20 Jul 1992 18:14:00 GMT

Subject: /dev/mem: too many open files

I have been working on some graphics code for linux and have come up
against a problem which I have not been able to solve despite trying
some fairly drastic solutions.

In my code (run as root) I open /dev/mem, mmap 2 regions of it, do the
graphics stuff and then exit. This seemed to be working perfectly
through many runs of the code until one time my error trapping on the
open was activated and perror said too many open files. This seemed a
bit odd 'cos I was only using one virtual console and not running any
other programs when I tried to run my graphics stuff. So, to cut a
long story short, how do I persuade linux that these files are
actually closed?

My original system was 0.96bp2 and I've tried

1. Syncing - no effect
2. Rebooting - no effect
3. Using a fresh copy of the kernel - no effect
4. Rebuilding the kernel from scratch - no effect
5. Using the 0.96c kernel - no effect
6. Rebuilding the entire filesystem (not fun) and rebuilding
   everything from the 0.96 rootimage disk.

If you have any suggestions that you think might help then please
email me 'cos I've tried everything I can think of and am getting more
than a little annoyed with Linux 'cos I want to program and I seem to
be spending all my time trying to fix things :-(

Iain