Displaying 6 results from an estimated 6 matches for "heap_memory".
2013 Mar 21
2
[LLVMdev] How to describe a pointer that points to All memory(include global memory, heap, stack)?
...I am building a flow sensitive intra-procedural alias analysis(without interprocedural info).
So, the first thing I have to consider is where a parameter-pointer or a global-pointer might point to.
Then I defined several special Virtual Memory Locations: ALL_MEMORY, GLOBAL_MEMORY, STACK_MEMORY, HEAP_MEMORY. ALL_MEMORY contains GLOBAL_MEMORY, STACK_MEMORY, HEAP_MEMORY.
e.g1:
extern int * q;
void f(int * p)
{
int a;
*p = 0; //STMT1
*q = a; //STMT2
}
For above case, both p and q pointed to ALL_MEMORY: p->ALL_MEMORY, q->ALL_MEMORY.
And each STMT has two BitVectors to descri...
2013 Mar 21
2
[LLVMdev] How to describe a pointer that points to All memory(include global memory, heap, stack)?
Hi, Daniel, thank you for your advice.
Yes, ALL_MEMORY points to ALL_MEMORY.
We use MD(memory descriptor) to abstract a memory location.
MD contains 4 main fields: id, base, offset, size.
For these special MD (ALL_MEMORY, GLOBAL_MEMORY, STACK_MEMORY, HEAP_MEMORY),
we give them id 1, 2, 3, 4, that means MD1 is ALL_MEMORY, MD2 is GLOBAL_MEMORY, the same goes for the rest.
Then we maintain a BITSET class to encapsulate the 'union', 'intersect', 'diff' etc to simply the operations bewteen special
MD and other general MDs.
e.g: union...
2013 Mar 21
0
[LLVMdev] How to describe a pointer that points to All memory(include global memory, heap, stack)?
...ensitive intra-procedural alias analysis(without interprocedural info).
> So, the first thing I have to consider is where a parameter-pointer or a global-pointer might point to.
> Then I defined several special Virtual Memory Locations: ALL_MEMORY, GLOBAL_MEMORY, STACK_MEMORY, HEAP_MEMORY. ALL_MEMORY contains GLOBAL_MEMORY, STACK_MEMORY, HEAP_MEMORY.
Contains or points to?
ALL_MEMORY should point to ALL_MEMORY, otherwise *ALL_MEMORY !=
ALL_MEMORY, which will break things like linked lists.
In any case, the final representation in GCC of points to anything is
a single bit flag....
2013 Mar 22
0
[LLVMdev] How to describe a pointer that points to All memory(include global memory, heap, stack)?
....com.cn> wrote:
> Hi, Daniel, thank you for your advice.
> Yes, ALL_MEMORY points to ALL_MEMORY.
>
> We use MD(memory descriptor) to abstract a memory location.
> MD contains 4 main fields: id, base, offset, size.
> For these special MD (ALL_MEMORY, GLOBAL_MEMORY, STACK_MEMORY, HEAP_MEMORY),
> we give them id 1, 2, 3, 4, that means MD1 is ALL_MEMORY, MD2 is GLOBAL_MEMORY, the same goes for the rest.
> Then we maintain a BITSET class to encapsulate the 'union', 'intersect', 'diff' etc to simply the operations bewteen special
> MD and other general MDs....
2013 Mar 13
0
[LLVMdev] How to describe a pointer that points to All memory(include global memory, heap, stack)?
On 3/13/13 4:06 AM, Steven Su wrote:
> Hello, could any one point me following question.
Without any context, your question is difficult to answer. Are you
building a points-to analysis and wanting to know how an alias analysis
might encode the fact that a pointer could alias any other pointer?
-- John T.
>
> e.g:
> void foo(int * p)
> {
> *p = 0;
> }
>
2013 Mar 13
2
[LLVMdev] How to describe a pointer that points to All memory(include global memory, heap, stack)?
Hello, could any one point me following question.
e.g:
void foo(int * p)
{
*p = 0;
}
Here 'p' may point to all memory location.
Could you tell me how to represent the POINT TO set of 'p'?
Here is my solution:
Introduce a memory-class named: Global_Mem, then p pointed to global_mem.
And the MOD set of '*p=0' is