Issue 15058: Potential Bug in dlpvalloc and dlvalloc (original) (raw)

Issue15058

Created on 2012-06-13 17:46 by Ken.Cheung, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
dlmalloc_clone.txt Ken.Cheung,2012-06-13 17:46
Messages (2)
msg162718 - (view) Author: Ken Cheung (Ken.Cheung) Date: 2012-06-13 17:46
I observed a code clone from the following files. function : dlpvalloc @ (file: "Python-3.3.0a2/Modules/_ctypes/libffi/src/dlmalloc.c", line: 4360)~4362 function : dlvalloc @ (file: "Python-3.3.0a2/Modules/_ctypes/libffi/src/dlmalloc.c", line: 4353)~4355 The function dlpvalloc performs a bitwise operation at return while dlvalloc does not. I wonder if this is necessary in dlvalloc. The source code is included in the attachment. Hope it helps.
msg162721 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2012-06-13 18:44
Well, this bitwise operation is exactly why there are two functions: dlvpalloc rounds up to the nearest page size, and dlvalloc does not.
History
Date User Action Args
2022-04-11 14:57:31 admin set github: 59263
2012-06-13 18:44:24 amaury.forgeotdarc set status: open -> closedresolution: works for memessages: +
2012-06-13 18:33:15 r.david.murray set nosy: + amaury.forgeotdarc, meador.inge
2012-06-13 17:47:13 Ken.Cheung set title: Potential Bugs in dlpvalloc and dlvalloc -> Potential Bug in dlpvalloc and dlvalloc
2012-06-13 17:46:46 Ken.Cheung create