TAILIEUCHUNG - HandBooks Professional Java-C-Scrip-SQL part 162

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 162', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Originally I wasn t planning to make any changes to the program from the previous version to this one other than increasing the buffer size. However when running tests with the 64 MB memory configuration I discovered that making just that one change caused the program to fail with a message telling me I was out of memory. This was hard to understand at first because I was allocating only 16 MB at any one time surely a 64 MB machine even one running Windows 95 should be able to handle that without difficulty However the program was crashing at the same place every time I ran it with the same data after a number of passes through the main loop so I had to figure out what the cause might be. At first I didn t see anything questionable about the program. On further examination however I did notice something that was cause for concern I was allocating and freeing those memory buffers every time through the main loop. While it seems reasonable to me that allocating a number of buffers and then freeing all of them should return the memory allocation map to its original state apparently this was not the case. At least that s the only explanation I can find for why the available memory displayed by the debugger should drop suddenly after a number of passes through the main loop in which it remained nearly constant. Actually even if allocating and freeing the buffers every time through the loop did work properly it really isn t the right way to handle the memory allocation task. It s much more efficient to allocate one large buffer and just keep pointers to the places in that buffer where our smaller logically distinct buffers reside. Once I made those changes to the program the crashes went away so I apparently identified the problem correctly. The new improved version is shown in Figure . Zensort version 3 Zensort Figure zensort I think the changes in the program are relatively self-explanatory. Basically the only changes are the .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.