Skip to content

Commit df66765

Browse files
acabellojgpshead
andauthored
pythongh-137928: remove redundant size validation in multiprocessing.heap (pythonGH-137929)
remove redundant size check, malloc does it --------- Co-authored-by: Gregory P. Smith <[email protected]>
1 parent 0e88be6 commit df66765

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Lib/multiprocessing/heap.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,6 @@ class BufferWrapper(object):
324324
_heap = Heap()
325325

326326
def __init__(self, size):
327-
if size < 0:
328-
raise ValueError("Size {0:n} out of range".format(size))
329-
if sys.maxsize <= size:
330-
raise OverflowError("Size {0:n} too large".format(size))
331327
block = BufferWrapper._heap.malloc(size)
332328
self._state = (block, size)
333329
util.Finalize(self, BufferWrapper._heap.free, args=(block,))

0 commit comments

Comments
 (0)