WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
34601
[BREWMP] Port Heap::allocateBlock and Heap::freeBlock
https://bugs.webkit.org/show_bug.cgi?id=34601
Summary
[BREWMP] Port Heap::allocateBlock and Heap::freeBlock
Kwang Yul Seo
Reported
2010-02-04 09:56:27 PST
Use fastMalloc to allocate 64KB aligned memory because BREW has neither VirtualAlloc nor mmap. There is no way to allocate aligned memory in BREW.
Attachments
Patch
(3.50 KB, patch)
2010-02-04 10:02 PST
,
Kwang Yul Seo
abarth
: review-
Details
Formatted Diff
Diff
Moved the advance logic from Heap::allocate to CollectorBitmap::advanceToNextPossibleFreeCell.
(2.12 KB, patch)
2010-05-26 13:58 PDT
,
Nathan Lawrence
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Kwang Yul Seo
Comment 1
2010-02-04 10:02:35 PST
Created
attachment 48154
[details]
Patch This is not a space-efficient way to allocate aligned memory. Any suggestion to improve this?
Eric Seidel (no email)
Comment 2
2010-03-05 14:22:27 PST
Comment on
attachment 48154
[details]
Patch I don't understand why m_rawMemoryMap is needed. Isn't the conversion from requested address to real address always the same?
Adam Barth
Comment 3
2010-03-09 07:32:51 PST
Comment on
attachment 48154
[details]
Patch I would have called addressAligned alignedAddress, but that's just a nit. To answer Eric's question, the two are different in the case were fastMalloc returns an unaligned address because + addressAligned &= BLOCK_MASK; changes the address. This patch is horribly memory inefficient. It seems to cause JavaScript use about twice as much memory as necessary. I'd recommend finding another strategy to allocate aligned addresses.
Nathan Lawrence
Comment 4
2010-05-26 13:58:59 PDT
Created
attachment 57131
[details]
Moved the advance logic from Heap::allocate to CollectorBitmap::advanceToNextPossibleFreeCell.
Nathan Lawrence
Comment 5
2010-05-26 14:02:10 PDT
Comment on
attachment 57131
[details]
Moved the advance logic from Heap::allocate to CollectorBitmap::advanceToNextPossibleFreeCell. sorry, wrong bug.
Kwang Yul Seo
Comment 6
2010-08-11 05:38:57 PDT
This patch is no longer necessary as Heap::allocateBlock and Heap::freeBlock are changed to use AlignedMemoryAllocator.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug