зеркало из https://github.com/mozilla/pjs.git
Fixed allocation alignment problem: checking in for jim_nance@yahoo.com
b=85890 r=attinasi sr=alecf
This commit is contained in:
Родитель
78acc02575
Коммит
e2467c9201
|
@ -558,8 +558,8 @@ FrameArena::AllocateFrame(size_t aSize, void** aResult)
|
|||
{
|
||||
void* result = nsnull;
|
||||
|
||||
// Round size to multiple of 4
|
||||
aSize = PR_ROUNDUP(aSize, 4);
|
||||
// Ensure we have correct alignment for pointers. Important for Tru64
|
||||
aSize = PR_ROUNDUP(aSize, sizeof(void*));
|
||||
|
||||
// Check recyclers first
|
||||
if (aSize < gMaxRecycledSize) {
|
||||
|
@ -585,8 +585,8 @@ FrameArena::AllocateFrame(size_t aSize, void** aResult)
|
|||
nsresult
|
||||
FrameArena::FreeFrame(size_t aSize, void* aPtr)
|
||||
{
|
||||
// Round size to multiple of 4
|
||||
aSize = PR_ROUNDUP(aSize, 4);
|
||||
// Ensure we have correct alignment for pointers. Important for Tru64
|
||||
aSize = PR_ROUNDUP(aSize, sizeof(void*));
|
||||
|
||||
// See if it's a size that we recycle
|
||||
if (aSize < gMaxRecycledSize) {
|
||||
|
|
|
@ -558,8 +558,8 @@ FrameArena::AllocateFrame(size_t aSize, void** aResult)
|
|||
{
|
||||
void* result = nsnull;
|
||||
|
||||
// Round size to multiple of 4
|
||||
aSize = PR_ROUNDUP(aSize, 4);
|
||||
// Ensure we have correct alignment for pointers. Important for Tru64
|
||||
aSize = PR_ROUNDUP(aSize, sizeof(void*));
|
||||
|
||||
// Check recyclers first
|
||||
if (aSize < gMaxRecycledSize) {
|
||||
|
@ -585,8 +585,8 @@ FrameArena::AllocateFrame(size_t aSize, void** aResult)
|
|||
nsresult
|
||||
FrameArena::FreeFrame(size_t aSize, void* aPtr)
|
||||
{
|
||||
// Round size to multiple of 4
|
||||
aSize = PR_ROUNDUP(aSize, 4);
|
||||
// Ensure we have correct alignment for pointers. Important for Tru64
|
||||
aSize = PR_ROUNDUP(aSize, sizeof(void*));
|
||||
|
||||
// See if it's a size that we recycle
|
||||
if (aSize < gMaxRecycledSize) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче