memory-management 相关问题

动态分配和释放部分物理内存的过程,以便在请求者之间尽可能公平并且没有饥饿的情况下响应程序请求。


直接写入缓存,而不是RAM?

可以从磁盘读取数据并将其直接写入缓存(应该更快的速度)而不与RAM交互? 原因是我需要从非常大的文件中读取数据并写

回答 1 投票 0



如何更快地清除VBA收藏?

Set myCollection = New Collection

回答 1 投票 0



在内核模块中分配物理连续页 我正在尝试使用alloc_pages_exact函数在DRAM中分配物理连续的页面。当我尝试分配10MB的页面时,返回的地址总是0。但是当我尝试分配...

static int __init hello_entry(void){ unsigned long i = 0; unsigned long j = 0; unsigned long counter; int fault = 0; char default_value = 0xff; unsigned long size_of_memory_to_test_bytes = 10 * 1024 * 1024;//10MB chunk unsigned long page_size = 8 * 1024;//8kB page size. From data sheet for elpida 4GB ddr3 ram unsigned long number_of_pages = size_of_memory_to_test_bytes / page_size; unsigned long number_of_hammer_access = 200000; printk("Number Of Bytes to allocate: %ld\n", number_of_pages * page_size); char* pages = (char *)alloc_pages_exact(number_of_pages * page_size, GFP_KERNEL); while(pages == 0);//The Program must wait till enough pages have been allocated! printk("Starting Address: %x", pages); char *hammerRow0, *hammerRow1, *victimRow; char hammerRow0_data, victimRow_data, hammerRow1_data, read_midvalue; printk(KERN_ALERT "Memory Test Entry!\n"); printk(KERN_ALERT "Page Size: %ld\n", page_size); printk(KERN_ALERT "Cache Line Size: %d\n", cache_line_size()); //The design consists of two hammer rows which will be repeatedly accessed one after another //There will be a victim row in between the two hammer rows, kind of like a victim row sandwiched between two hammer rows //This will server two purposes: //1. Greater probability of inducing bitflip in the victim row due to repeated access of two adjacent rows. //2. Clearing out the row buffer of DRAM chip so that it is guaranteed that the wordline will be accessed to access the data printk(KERN_INFO "Rowhammer Test Starts\n"); for(counter = 0; counter < number_of_pages - 2; counter++){ //Doing the rowhammer test on every page of dram hammerRow0 = pages + counter; victimRow = hammerRow0 + page_size; hammerRow1 = victimRow + page_size; //Storing initial data into rows to check them later for errors for(i = 0; i < page_size / sizeof(char); i++){ //Setting all bits of dram 1 to maximize the possibility of charge leak hammerRow0[i] = default_value; victimRow[i] = default_value; hammerRow1[i] = default_value; } //Starting Hammer Test //printk(KERN_INFO "Rowhammer Test Starts\n"); fault = 0; for(j = 0; j < number_of_hammer_access; j++){ //hammerRow0 access //This is an x86 specific funnction that executes CLFLUSH. Mre info on CLFLUSh: https://c9x.me/x86/html/file_module_x86_id_30.html clflush_cache_range(hammerRow0, sizeof(char)); read_midvalue = hammerRow0[0]; //Reading the first value present in the page //hammerRow1 access clflush_cache_range(hammerRow1, sizeof(int)); read_midvalue = hammerRow1[0]; //Reading the first value present in the page } //Checking the victim row for errors for(i = 0; i < page_size / sizeof(int); i++){ victimRow_data = victimRow[i]; if(victimRow_data != default_value){ printk(KERN_ALERT "victimRow Fault (After Hammering) at index %d: Present Value: %x \t Expected Value: %x:\tRow numer %d\n", i, victimRow_data, 0xff, counter); fault = 1; } } if(fault == 1){ printk(KERN_ALERT "Rowhammer Test Failed\n"); return 0; } else { //printk(KERN_ALERT "Rowhammer Test Passed for Row %d\n", counter); } } printk(KERN_ALERT "Rowhammer Test Passed\n"); return 0; } static void __exit hello_exit(void){ printk(KERN_INFO "Memory Test Exit!\n"); } module_init(hello_entry); module_exit(hello_exit); //Licensing Info MODULE_LICENSE("GPL"); MODULE_AUTHOR("jonvonton"); MODULE_DESCRIPTION("Rowhammer Testing");

回答 1 投票 0

为什么我们有一个缓慢的“ malloc”? 据我所知,自定义内存管理器用于多个中等大规模项目。 SECE的最新答案。SE讨论了以下事实:OpenSSL中的自定义内存分配器包括...

线程在这里讨论了内存分配器,特别是一个答案链接到一份学术论文,该论文表明,尽管人们出于绩效原因而写自定义记忆分配器时,因为

回答 1 投票 0


为什么在静态内存部分中分配堆栈帧,如果他们没有打电话?为什么表现会增长?

对我的问题进行搜索只会产生无关的结果。这是最接近的,但没有回答我的问题是堆栈“静态分配”的变量? 所以我知道如果是

回答 1 投票 0

检查Arduino

,是否有一种方法可以检查Arduino使用的内存量?

回答 3 投票 0



将内存映射的I/O地址和RAM地址相关?

我阅读了答案,类似的问题是如何将RAM地址与内存映射地址区分开来,但我仍然感到困惑。 假设一个附加4GB RAM的系统和一些内存映射的Periphe ...

回答 1 投票 0

可以安全删除空指针?

安全删除无效指针吗? 这是一种很好的编码风格吗?

回答 5 投票 0

什么是进程com.android.chrome:sandboxed_process0?

我有一个带有一个过程的Android应用程序,并且总是运行服务,在检查运行服务时,我看到我的应用程序有两个运行过程,一个为我提供了一个,另一个来自Chrome,称为“ COM.AN ... AN ...

回答 1 投票 0

在多处理下运行的线程不会更新其实例属性

我想并行运行多个类实例,并使用redis更新实例属性。在每个类实例上,我在后台运行一个线程,以收听Redis进行更改。当我跑步...

回答 1 投票 0

什么是内存安全漏洞?

我正在研究正在寻找记忆安全脆弱性缓解技术的竞赛。我做了一些研究,但我无法提出真正的记忆安全脆弱性。

回答 2 投票 0


最新问题
© www.soinside.com 2019 - 2025. All rights reserved.