memory-access Questions

6

I read that a 64-bit machine actually uses only 48 bits of address (specifically, I'm using Intel core i7). I would expect that the extra 16 bits (bits 48-63) are irrelevant for the address, and w...
Ruelas asked 24/4, 2013 at 17:40

6

Solved

I am running an application through gdb and I want to set a breakpoint for any time a specific variable is accessed / changed. Is there a good method for doing this? I would also be interested in o...
Nun asked 12/9, 2008 at 12:46

14

Solved

Memory access through pointers is said to be more efficient than memory access through an array. I am learning C and the above is stated in K&R. Specifically they say Any operation that can ...
Christachristabel asked 21/2, 2010 at 11:56

3

I'm using libdis, the x86 disassembler library from the bastard, and I'm trying to find out which instructions access memory. With reference to these two instructions: mov eax, [ebx + 10] lea eax...
Comfortable asked 16/12, 2013 at 23:26

1

Solved

Every modern high-performance CPU of the x86/x86_64 architecture has some hierarchy of data caches: L1, L2, and sometimes L3 (and L4 in very rare cases), and data loaded from/to main RAM is cached ...
Detect asked 20/1, 2018 at 19:26

1

Solved

Good evening, I've been trying to build a golang application which scans values in memory but am struggling trying to understand how to address specific memory locations. I know that when accessin...
Merger asked 21/5, 2016 at 3:10

5

I was recently asked about a piece of code to decimate/downsample the array "in-place". This "decimation" function takes an array of ints and stores an entry at an even index i in the array at the ...
Ferreira asked 10/9, 2017 at 8:17

1

I have a Microsoft visual studio application that is grabbing frames from cameras and I am trying to display those frames in a Qt application. I am doing some processing with the frames using OpenC...
Persimmon asked 10/7, 2017 at 13:21

2

Solved

I have data laid out in memory in a Structure of Arrays (SoA) or Sturcture of Pointers (SoP) form, and have a way to access that data as though it were laid out in Array of Structure (AoS) form -- ...

1

Solved

Consider the following code: #include <iostream> int main() { char* c = new char('a'); char ac[4] = {'a', 'b', 'c', 'd'}; unsigned long long int* u = reinterpret_cast<unsigned l...
Ingles asked 7/10, 2016 at 3:34

3

In order to find avg memory access time we have the formula : Tavg = h*Tc +(1-h)*M where h = hit rate (1-h) = miss rate Tc = time to access information from cache M = miss penalty (time to acc...
Selfloading asked 14/2, 2014 at 9:32

1

Solved

I have two different functions inside an addon I have been working on in C#. Recently (Apparently) Solidworks has been crashing when it gets to certain parts of these two functions (possibly more, ...
Personification asked 31/5, 2016 at 12:33

1

Solved

Let us assume that I have two pointers that are pointing to unrelated addresses that are not cached, so they will both have to come all the way from main memory when being dereferenced. int load_a...
Cretinism asked 2/5, 2016 at 19:15

8

Solved

Edit: For reference purposes (if anyone stumbles across this question), Igor Ostrovsky wrote a great post about cache misses. It discusses several different issues and shows example numbers. End Ed...
Portillo asked 14/7, 2009 at 16:25

4

Solved

What is "coalesced" in CUDA global memory transaction? I couldn't understand even after going through my CUDA guide. How to do it? In CUDA programming guide matrix example, accessing the matrix row...
Aufmann asked 18/2, 2011 at 12:33

4

Solved

Is there any performance difference when we access a memory location by using a pointer and double pointer? If so, which one is faster ?
Oahu asked 13/2, 2014 at 11:28

1

One of the more commonplace debugging errors in my own development (Mac, iOS) is EXC_BAD_ACCESS. Despite its commonness, its origin and precise meaning remain mysterious. Google lists many oc...
Eugenie asked 6/3, 2013 at 17:35

1

Solved

Edit: Proposed solutions results are added at the end of the question. I'm starting to program with OpenCL, and I have created a naive implementation of my problem. The theory is: I have a 3D grid ...
Cummerbund asked 2/7, 2013 at 8:10

2

Solved

I am getting the following type of error. I know it has something to do with me improperly accessing memory, but I don't exactly how. Please help me see where I have gone wrong. *note I have simpl...
Balcony asked 23/9, 2012 at 0:49

3

Solved

How do I make something like this work? void *memory = malloc(1000); //allocate a pool of memory *(memory+10) = 1; //set an integer value at byte 10 int i = *(memory+10); //read an integer value f...
Gusella asked 15/7, 2012 at 9:52

1

Solved

I am writing a simple VM and I have a question on implementing object and structure member access. Since the begin address of a program is arbitrary on each run, and subsequently the address of ea...
Stowe asked 15/7, 2012 at 6:57

1

Solved

I'm trying to figure out what the assembly instruction actually does addsd -8(%rbp), %xmm0 I know that it's a floating point addition on an x86-64 machine with SSE2. Also, I know that %xmm0 is a...
Costard asked 1/5, 2012 at 15:28

1

Solved

I'm trying to compile some code that uses the fmemopen function in MinGW. I found out that this function is not available MinGW. I need a function equivalent to fmemopen(). Are there any alternat...
Triclinium asked 5/9, 2011 at 12:16

3

Solved

My search foo seems lacking today. I would like to know if it is legal according to std C++ to inspect "any" memory location via an (unsigned(?)) char*. By any location I mean any valid address of...
Delwyn asked 9/7, 2011 at 12:51

3

Solved

I am thinking about a problem I have been having for some time now.. I would like to write a C/C++ program (under windows first) that can access(read/change values) the memory(stack, heap, everythi...
Banville asked 16/5, 2011 at 10:39

© 2022 - 2024 — McMap. All rights reserved.