memory-address

Where is the Linear Address Space located?

拈花ヽ惹草 提交于 2021-02-10 15:10:58
问题 I'm reading the intel manual, and I see mentions of "Linear Address Space of the processor". I'm confused as to where or what the linear address space actually is. Where in the processor is the linear address space? The Physical Address Space is the actual RAM as I understand. A logical address is a "segment selector" + "offset", and it must be translated to a physical address. If I understand, if paging is not used, the linear address space is effectively the same as a physical address in

Where is the Linear Address Space located?

孤人 提交于 2021-02-10 15:05:59
问题 I'm reading the intel manual, and I see mentions of "Linear Address Space of the processor". I'm confused as to where or what the linear address space actually is. Where in the processor is the linear address space? The Physical Address Space is the actual RAM as I understand. A logical address is a "segment selector" + "offset", and it must be translated to a physical address. If I understand, if paging is not used, the linear address space is effectively the same as a physical address in

Obtaining physical address trace from GEM5

亡梦爱人 提交于 2021-02-10 07:13:48
问题 I've been trying to extract physical address accessed by the application in order to analyze the row hits. In doing so, I followed this page with little variation due to version change. I fixed CacheConfig.py as: system.monitor2 = CommMonitor() system.monitor2.trace = MemTraceProbe(trace_file = "CT_mon2.trc.gz") system.monitor2.slave = system.l2.mem_side system.membus.slave = system.monitor2.master system.l2.cpu_side = system.tol2bus.master And ran a code: build/X86/gem5.opt --debug-flag

Obtaining physical address trace from GEM5

不想你离开。 提交于 2021-02-10 07:08:04
问题 I've been trying to extract physical address accessed by the application in order to analyze the row hits. In doing so, I followed this page with little variation due to version change. I fixed CacheConfig.py as: system.monitor2 = CommMonitor() system.monitor2.trace = MemTraceProbe(trace_file = "CT_mon2.trc.gz") system.monitor2.slave = system.l2.mem_side system.membus.slave = system.monitor2.master system.l2.cpu_side = system.tol2bus.master And ran a code: build/X86/gem5.opt --debug-flag

Reading all process memory to find address of a string variable c#

我的梦境 提交于 2021-02-08 13:25:07
问题 I have 2 programs written in c#, first one called "ScanMe" contains a string variable that contains value "FINDMEEEEEEE", and a double variable that has the value of 1546.22915487. And the other program called "MemoryScan" reads all the memory of the first program. I want to get the memory address of the string variable of that process When i execute "MemoryScan" and reads all the memory of "ScanMe" process, then i try to find the byte array of the string in all the data scanned and i get

Is char pointer address initialization necessary in C?

百般思念 提交于 2021-02-07 20:21:05
问题 I'm learning C programming in a self-taught fashion. I know that numeric pointer addresses must always be initialized, either statically or dynamically. However, I haven't read about the compulsory need of initializing char pointer addresses yet. For example, would this code be correct, or is a pointer address initialization needed? char *p_message; *p_message = "Pointer"; 回答1: I'm not entirely sure what you mean by "numeric pointer" as opposed to "char pointer". In C, a char is an integer

How do I find the memory address of a string?

冷暖自知 提交于 2021-02-07 09:15:43
问题 I am having a mental block and I know I should know this but I need a little help. If I declare a string variable like this: string word = "Hello"; How do I find the memory address of "Hello"? Edit: This is what I am trying to do... Write a function that takes one argument, the address of a string, and prints that string once. (Note: you will need to use a pointer to complete this part.) However, if a second argument, type int, is provided and is nonzero, the function should print the string

Why use RIP-relative addressing in NASM?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-06 09:25:50
问题 I have an assembly hello world program for Mac OS X that looks like this: global _main section .text _main: mov rax, 0x2000004 mov rdi, 1 lea rsi, [rel msg] mov rdx, msg.len syscall mov rax, 0x2000001 mov rdi, 0 syscall section .data msg: db "Hello, World!", 10 .len: equ $ - msg I was wondering about the line lea rsi, [rel msg] . Why does NASM force me to do that? As I understand it, msg is just a pointer to some data in the executable and doing mov rsi, msg would put that address into rsi .

Allocate at low memory address

江枫思渺然 提交于 2021-02-05 06:38:05
问题 In order to test a software in limit conditions, I'm trying to create a test case where the provided user buffer is allocated at some very low memory address. Something very close to NULL , like for example 0x1000h . This is proving a tough condition to create. Actually, I'm unable to generate that with malloc() on Linux, BSD, Windows, or OS-X. I'm convinced this situation can happen on other types of devices, but I need a reproducible test case that can be inserted into a CI test suite. Is

How do you use scanf to get an int in C?

ぃ、小莉子 提交于 2021-02-04 20:38:22
问题 I'm trying to learn the benefits and shortcomings of different ways to get input from the console. I'm confused with scanf . Why do I need to use use &favNumber instead of favNumber ? I understand that &favNumber is the address location of favNumber , but why is it done this way? I feel like there's a type mismatch here where favNumber is an int and I'm telling scanf that it's a pointer to an int. I thought I wrapped my head around pointers but this is confusing me a bit. Any help would be