Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4153338

Change AddCR to allow the client code to do its own memory management

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description

      In \src\win32\native\sun\windows\awt_TextComponent.cpp,
      the AddCR function deletes the buffer passed into it by
      the client if it needs to allocate more memory. This
      function really ought to be changed to allow the client
      to do its own memory management. There ought to be a
      new function that returns the amount of memory needed
      for the new buffer, and the client code can allocate
      memory as necessary.

      One benefit of this would be to enable use of alloca
      instead of malloc in places where it is not possible
      now (e.g. using the TO_WSTRING macro in Unicode.h in
      awt_TextArea.cpp - see bugid 4141477).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                son Oleg Sukhodolsky (Inactive)
                Reporter:
                ehawkessunw Eric Hawkes (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: