The driver in the title works with a PCIe card to get some data from outside world to a PC.
The driver will allocate tens of MB's memory when it starts up, then user program can map these memory to its own address space, then the data can be put there by the card to be accessed by user program.
My question:
- Suppose user program crashs after it mapped the memory or it forgets to unmap the memory before it exits, will that cause any resource leaking?
- If the answer of first question is true, is there anything can be done in the driver to avoid the leaking?
Any suggestion will be appreciated.