在 Leetcode 中获取 heap-use-after-free
作者:MeYokYang 提问时间:11/21/2022
我有一个 Leetcode 问题,No.142,链表周期 II。我的代码就是这样: /** * Definition for singly-linked list. * struct ListN...
内存 问答列表
作者:MeYokYang 提问时间:11/21/2022
我有一个 Leetcode 问题,No.142,链表周期 II。我的代码就是这样: /** * Definition for singly-linked list. * struct ListN...
作者:Code cracker 提问时间:6/22/2021
我试图在 Swift 中使用 clousures 避免内存泄漏,但 Swift 没有识别闭包内的 [弱自我]。 // class : class LanguageClass { var...
作者:Chipuc Valentin 提问时间:12/2/2022
我试图从一个未分配的指针创建一个二维数组。 我在这里得到“realloc(): invalid next size”: int nr=0,**cycles; int steps=10; whi...
作者:Nikola 提问时间:12/5/2022
我编写了一个 *.tcl 脚本,用于在文本模式(命令行)中使用 VMD 计算轨迹帧 (n=5000) 之间的成对 RMSD。但是,当我在终端上运行脚本(vmd -dispdev text -e dis...
作者:Alex Babushin 提问时间:12/7/2022
我遇到了烦人的问题,我不太明白, 我有int *类型的指针 示例代码: int* p_Memory_blocks; int MemoryInit(int num_of_blocks, int b...
作者:Karl ZHU 提问时间:12/7/2022
我写了一些代码,我需要处理失败或.我知道如果内存分配失败,它会返回,我写了如下内容:Cmalloc()realloc()NULL char *str = (char *)malloc(sizeof...
作者:itsmarziparzi 提问时间:12/12/2022
因此,我正在研究一些编码面试类型问题的解决方案,并且结构中有一个数组 #define MAX_SIZE 1000000 typedef struct _heap { int data[MAX_S...
作者:CindyRabbit 提问时间:11/23/2011
这是我使用 dequeue_huge_page_vma() 和 alloc_buddy_huge_page() 分配一个大页面的模块。为了使它们独立于 vma,我从 __get_vm_area_nod...
作者:nini 提问时间:12/22/2022
所以,我所有的工作都很好,但只有免费功能被禁用 我很确定问题出在我使用 malloc 的方式上 // This is the head typedef struct Contact { cha...
作者:user20946097 提问时间:1/7/2023
我正在尝试阅读行,直到 EOF。如果该行的长度大于 maxLength,则其余部分将被截断。 如果行数超过 S,则应重新分配双倍的行数。 在重新分配之前,一切正常。当它到达该部分时,程序崩溃。 我已经...