word. It's only used for the method
    // getWords.
    const mallocedWords = CanvasKit.Malloc(Uint32Array, 2);
    mallocedWords.toTypedArray().set([0, text.length]);

    const graphemeBoundaries = getGraphemeBoundaries(text);
    const mallocedGraphemes = CanvasKit.Malloc(Uint32Array, graphemeBoundaries.length);
    mallocedGraphemes.toTypedArray().set(graphemeBoundaries);

    const lineBreaks = getLineBreaks(text);
    const mallocedLineBreaks = CanvasKit.Malloc(Uint32Array, lineBreaks.length);
    ma