-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release memory when space is freed from Ramdisk #4
Comments
This is handled by the driver while my tool is just a nice GUI to configure it. I don't think it ever releases the memory but I am not good enough with C++ and could be wrong. Here is the source code - if you can find how to ask the driver to release the memory, I can then find a way to add this feature to the GUI. |
Thank you for the quick response. ImDisk supported this feature with its 'dynamic allocation' option. Perhaps that is just no longer available. I will take a look at the arsenal source. Much obliged. |
I am using the GUI with driver v13.12.41.506 from May 20, 2019. The latest version probably has more features but I have not tried it. Since I have no issues with the old version of the driver - I have not invested time to update the GUI to use the new features of the latest driver. |
The Arsenal's aim_cli tool is very nice: I created a dynamic VHD image natively in Windows 11 with a drive letter, label and filesystem, attached right it right there as well, put default content, detached the drive, and what's left is to just mount it with |
I guess I will have a deeper look at the newest aim_cli and try to discover how does it communicate with the driver in order to create a dynamic RAM-disk. It's probably something small. |
@igorbaryshev Can you confirm the following:
|
@tmcdos yes, pretty much this. |
@igorbaryshev Does it also happen when you do not initialize the RAM-disk from a VHD but just create it empty, format it, copy large file and then delete it? |
If you mean just running command to create ramdisk without any image, then no. If you mean creating the VHD via aim_cli and mounting that, then it should be the same as with mounting any other image. Syntax to create a new disk image file:
aim_cli --create --filename=imagefilename --disksize=size [--variant=fixed|dynamic] [--mount]
Size in bytes, can be suffixed with for example M or G for MB or GB. This one should do it, and you can continue formatting it however you need. |
No, I do not use VHD (or any other) image(s) for my RAM-disk. I just wanted to make sure that you and/or other users can confirm that the Arsenal driver really releases the grabbed memory when it is not needed - or it does not (as I suspect). |
Mark from Arsenal replied to me and forwarded a response from Olof.
Since I am scratching my own itch with this GUI, I have particular goals which do not align well with VHD image:
So apparently the only option for dynamic RAM allocation is
as suggested by @igorbaryshev |
Thanks for chasing down that reply. It seems an uncharacteristic regression since ImDisk always supported dynamic memory allocation, even without use of an image, and the same developer is still championing both the old and new project. Oh well 🤷♂️ Seems like it's time for us to leave @tmcdos in peace and take up our campaign with @LTRData ;) |
I am not the developer of ImDisk Toolkit (in your screenshots). It is an addition by v77 and supports for example dynamically allocated RAM disks. |
Maybe there was some kind of misunderstanding here. The VHD image is not modified by the driver when it is used for creating dynamically allocated RAM disks. It is only accessed when the RAM disk is created when it is copied into memory. After that, modifications happen only in memory and TRIM commands sent from AIM driver (in I have used this myself for many years now and never had any issues with it. I personally prefer to not copy anything back from RAM disk to physical disk on shutdown, but I understand that some people want that. It could probably be possible by scheduling something that copies some directories right before the RAM disk is removed. Also, right after creating the RAM disk from a mostly empty VHD, you could copy your on-disk directory structure to the RAM disk. (This will not update the VHD.)
Yes, or |
Yes, it was my misunderstanding about the VHD updating - Mark clarified this in a second email to me. Of course once the user decides about the RAM-disk size - it is not changed so often but still having to resize the VHD image (or at least this is my suspicion - I could be again misunderstanding) feels uncomfortable to me. When I get more free time, I will add ability to choose a VHD image through the GUI for those who want to have dynamic RAM allocation. The reason I've also implemented the ability to persist the RAM-disk contents on shutdown (which happens through the Windows service that is part of this project) is that sometimes I download some files from Internet on the RAM-disk and then forget to copy them on a non-volatile storage. So this is just a safety measure for my particular usecase. |
I think that v77 is also working on migrating ImDisk Toolkit to use Arsenal Image Mounter with the goal of providing similar features. I think it could take some time to complete though because there is surely a lot of work needed. |
If I knew C/C++ better, I could help. But I do not ... (I do not even like it, but that's another story) |
Thank you for this tool. It works great.
Is there anyway to free the memory allocated to the Ramdisk as data is deleted from it? The driver/system seems to hold on to the memory once allocated never releasing it.
The text was updated successfully, but these errors were encountered: