Code: Select all
#include <cstdio>
template <typename T> void foo(const T& x)
{ std::printf("%d\n", sizeof x);
}
int main()
{
int arr[8], *ptr;
foo(arr);
foo(ptr);
}
Code: Select all
#include <cstdio>
template <typename T> void foo(const T& x)
{ std::printf("%d\n", sizeof x);
}
int main()
{
int arr[8], *ptr;
foo(arr);
foo(ptr);
}
Isn't it "__attribute__((packed))"?Andyhhp wrote:ahh. I forgot about alignment problems
a better method is to use "__attribute__((packet))" which will ensure that no padding happens
~Andrew
You're using it incorrectly.xixpsychoxix wrote:How do I use the virtual memory manager to map these addresses to physical addresses?