Patentable/Patents/US-7962832
US-7962832

Method for detecting memory error

PublishedJune 14, 2011
Assigneenot available in USPTO data we have
Inventorsnot available in USPTO data we have
Technical Abstract

A method for easily detecting a memory error that may occur when a memory is accessed or an allocated memory is freed in the process of developing software is disclosed. The memory error detecting method includes: (a) generating an original block indication variable for indicating a starting memory block of a memory region allocated with respect to a variable included in a computer program; (b) detecting a memory error that may occur when the allocated memory region is accessed, by performing a certain operation (computing or arithmetic operation), before the allocated memory region is accessed, using a target block indication variable indicating memory block to be accessed in the allocated memory region and/or the original block indication variable; and (c) outputting information about a detected memory error.

Patent Claims
8 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. A method for detecting a memory error within source code of a computer program stored in a memory, comprising: (a) generating an original block indication variable for indicating a starting memory block of an allocated memory region, the allocated memory region having bounds; (b) adding an error check source code to the source code of the computer program that performs a computing operation, wherein the error check source code is added before portions of the source code of the computer program where memory access will occur, and wherein the computing operation checks for memory errors; (c) generating an identification code map region using the original block indication variable, the identification code map region stored in the memory; (d) detecting if an out of bounds memory error will occur when the allocated memory region is accessed before the allocated memory region is accessed by executing the error check source code to perform the computing operation, wherein the computing operation uses the identification code map region and at least one of a target block indication variable and the original block indication variable, wherein the target block indication variable indicates a memory block to be accessed in the allocated memory region, and wherein the computing operation checks whether the target block indication variable indicates a memory block outside the bounds of the allocated memory region, and determines a memory error if the target block indication variable indicates a memory block outside the bounds of the allocated memory region; and (e) outputting information about a detected memory error.

2

2. A computer-readable recording medium that stores a program which, when executed by a computer, causes the computer to execute the method as described in claim 1 .

3

3. The method of claim 1 , wherein the error check source code calls an API function to perform the computer operation.

4

4. The method of claim 1 , further comprising: (f) correcting the computer program source code if the memory error is detected.

5

5. The method of claim 1 , further comprising: (f) removing the error check source code from the computer program source code.

6

6. The method of claim 1 , wherein generating the identification code map region in step (b) further comprises: allocating an identification code to each memory block of the allocated memory region, wherein the identification code that corresponds to the respective memory blocks included in a single allocated memory region are successively stored in the identification code map region to form a single identification code group, and wherein the identification codes are allocated such that identification codes of the single identification code group are the same and identification codes of adjacent identification code groups in the identification code map region are different.

7

7. The method of claim 6 wherein the computing operation bf step (c) further comprises: checking whether or not an identification code corresponding to a memory block indicated by the target block indication variable is identical to an identification code corresponding to a memory block indicated by the original block indication variable, and determining that the target block indication variable indicates a memory block out of the bounds of the allocated memory region if the identification codes are not the same.

8

8. The method of claim 6 , wherein the identification codes of the identification code group are one of first to third bit values, and a fourth bit value is stored at a portion where the identification code groups are not formed in the identification code map region.

Classification Codes (CPC)

Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.

Patent Metadata

Filing Date

February 25, 2008

Publication Date

June 14, 2011

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “Method for detecting memory error” (US-7962832). https://patentable.app/patents/US-7962832

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.