On Mon, 6 Jan 2020 23:36:50 GMT, Alexander Matveev <almat...@openjdk.org> wrote:
>> modules/javafx.media/src/main/native/jfxmedia/platform/osx/avf/AVFAudioEqualizer.cpp >> line 422: >> >>> 421: mEQBufferA = (double*)calloc(mEQBufferSize, >>> sizeof(double)); >>> 422: mEQBufferB = (double*)calloc(mEQBufferSize, >>> sizeof(double)); >>> 423: } >> >> This is allocating 8 times (i.e., `sizeof(double)`) as much memory as >> before. I presume this is intentional? > > No, it is allocating same amount of memory as before, unless I am missing > something. > We used to have CAAutoFree<double> mEQBufferA and > CAAutoFree.alloc(size_t numItems) method allocates (numItems * sizeof(T)) > bytes. See deleted CAAutoDisposer.h for CAAutoFree class implementation. Yes, you're right. I missed that the previous `alloc` call was a method call on a CAAutoFree object, which does exactly what you said above. The new code is equivalent. ------------- PR: https://git.openjdk.java.net/jfx/pull/69