Method and device for taking internal storage as disk read-write
An implementation method and technology of virtual memory disk, applied in the field of data information processing, can solve problems such as slow reading and writing speed, and achieve the effect of fast access speed and high reading and writing efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0040] Considering the bottleneck problem of the read / write speed of the hard disk in the prior art, in the process of solving this problem in the embodiment of the present invention, it is assumed that if the files are stored in the memory, then when using these files, there is no need to frequently access the hard disk up. You can also store images such as website images or downloadable files in RAMDISK, which can greatly improve the read and write speed.
[0041] Based on the above factors, an embodiment of the present invention provides a method for implementing memory as a disk for reading and writing. This method is suitable for deployment on devices with storage capabilities, such as computers, mobile phones, and servers. Such as figure 1 As shown, the method includes:
[0042] 101. Obtain the address and naming rules of the virtual memory disk RAMDISK;
[0043] Wherein, this step can be divided into two parts: checking the memory address and checking the memory nami...
Embodiment 2
[0055] The embodiment of the present invention specifically takes the terminal as an example, and provides a method for realizing reading and writing of memory as a disk, such as figure 2 As shown, the method includes:
[0056] 201. Obtain the address and naming rules of the virtual memory disk RAMDISK;
[0057] Wherein, this step can be divided into two parts: checking the memory address and checking the memory naming rules.
[0058] For example: to view the system memory address, execute: dmesg|grep RAMDISK;
[0059] To view the system naming rules for RAMDISK, execute: ls -l / dev / ram*
[0060] 202. Create a RAMDISK as a disk for reading and writing according to the address and naming rules, and modify the capacity of the RAMDISK to a preset file storage capacity.
[0061] Wherein, in this embodiment, the preset file storage capacity is 2G.
[0062] For example: the system default RAMDISK size is 16MB. Modify the size of RAMDISK so that more files can be stored.
[00...
Embodiment 3
[0074] In order to facilitate the implementation of the methods in the first and second embodiments above, the embodiment of the present invention continues to provide a device for reading and writing the memory as a disk, such as image 3 shown, including:
[0075] Obtaining module 31, used to obtain the address and naming rules of the virtual memory disk RAMDISK;
[0076] Creating module 32, for creating described as disk read-write RAMDISK according to described address and naming rule;
[0077] Mounting module 33, used to set up a file system, and mount the RAMDISK created on the file system;
[0078] The memory fetching module 34 is configured to save the received file in the created RAMDISK, and read and write the file by accessing the created RAMDISK.
[0079] Optionally, the device also includes:
[0080] A modifying module, configured to modify the created capacity of the RAMDISK to a preset file storage capacity according to the address and naming rules.
[0081]...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com