TWI456395B - 追蹤一資料處理系統的記憶體使用率之方法 - Google Patents

追蹤一資料處理系統的記憶體使用率之方法 Download PDF

Info

Publication number
TWI456395B
TWI456395B TW101136089A TW101136089A TWI456395B TW I456395 B TWI456395 B TW I456395B TW 101136089 A TW101136089 A TW 101136089A TW 101136089 A TW101136089 A TW 101136089A TW I456395 B TWI456395 B TW I456395B
Authority
TW
Taiwan
Prior art keywords
item
tracking
memory
allocation
count
Prior art date
Application number
TW101136089A
Other languages
English (en)
Other versions
TW201321980A (zh
Inventor
Umesh S Vaishampayan
Daniel A Chimene
Daniel S Heller
Original Assignee
Apple Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Apple Inc filed Critical Apple Inc
Publication of TW201321980A publication Critical patent/TW201321980A/zh
Application granted granted Critical
Publication of TWI456395B publication Critical patent/TWI456395B/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0292User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/073Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a memory management context, e.g. virtual memory or cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/076Error or fault detection not based on redundancy by exceeding limits by exceeding a count or rate limit, e.g. word- or bit count limit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Software Systems (AREA)
  • Debugging And Monitoring (AREA)
  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Claims (20)

  1. 一種用於管理記憶體之電腦實施之方法,該方法包含:基於表示分配給一用戶端之一記憶體區塊之一記憶體位址的一控制代碼在一記憶體分配表中執行一第一查找操作以識別一分配項目並自該分配項目擷取一追蹤項目指標;及基於該追蹤項目指標在一記憶體追蹤表中執行一第二查找操作以識別一追蹤項目並將該追蹤項目之一記憶體分配計數遞增,其中該記憶體分配計數用以指示該用戶端引起一記憶體流失之一可能性。
  2. 如請求項1之方法,其中該用戶端係經由一程式之可執行程式碼之一序列的一回溯追蹤來識別,且其中基於該回溯追蹤之一雜湊值在該記憶體追蹤表中索引該追蹤項目。
  3. 如請求項1之方法,其中基於該控制代碼之一雜湊值來索引該記憶體分配表之該分配項目。
  4. 如請求項1之方法,其進一步包含:檢查該分配項目以藉由判定該分配項目是否含有一追蹤項目指標而判定該分配項目是否空閒而能夠自由使用;及若該分配項目係空閒的,則以該記憶體追蹤表之該追蹤項目的一位址更新該分配項目。
  5. 如請求項4之方法,其進一步包含:若該分配項目係空閒的,則檢查該記憶體追蹤表之該 追蹤項目以判定該記憶體分配計數是否大於一預定值;及若該記憶體分配計數大於該預定值,則判定該用戶端是否為該記憶體追蹤表之該追蹤項目的同一擁有者,其中若該用戶端為該追蹤項目之同一擁有者,則該追蹤項目之該記憶體分配計數遞增。
  6. 如請求項4之方法,其進一步包含:若該分配項目不空閒,其參照至一現有追蹤項目,則判定該用戶端是否為該記憶體追蹤表之該追蹤項目之同一擁有者;若該用戶端並非為同一擁有者,則將該現有追蹤項目之一記憶體分配計數遞減;及以該追蹤項目之一位址更新該記憶體分配表之該分配項目。
  7. 如請求項1之方法,其進一步包含:回應於對於解除分配由一第二控制代碼識別之一第二記憶體區塊的一請求,基於該第二控制代碼自來自該記憶體分配表之一第二分配項目擷取一第二追蹤項目指標;及基於該第二追蹤項目指標將該記憶體追蹤表之一第二追蹤項目的一記憶體分配計數遞減。
  8. 如請求項1之方法,其中該第一查找操作及該第二查找操作係僅對記憶體分配請求之樣本執行。
  9. 一種機器可讀儲存媒體,其中儲存有指令,該等指令在由一機器執行時,使該機器執行一用於管理記憶體之方 法,該方法包含:基於表示分配給一用戶端之一記憶體區塊之一記憶體位址的一控制代碼在一記憶體分配表中執行一第一查找操作以識別一分配項目並自該分配項目擷取一追蹤項目指標;及基於該追蹤項目指標在一記憶體追蹤表中執行一第二查找操作以識別一追蹤項目並將該追蹤項目之一記憶體分配計數遞增,其中該記憶體分配計數用以指示該用戶端引起一記憶體流失之一可能性。
  10. 如請求項9之機器可讀儲存媒體,其中該用戶端係經由一程式之可執行程式碼之一序列的一回溯追蹤來識別,且其中基於該回溯追蹤之一雜湊值在該記憶體追蹤表中索引該追蹤項目。
  11. 如請求項9之機器可讀儲存媒體,其中基於該控制代碼之一雜湊值來索引該記憶體分配表之該分配項目。
  12. 如請求項9之機器可讀儲存媒體,其中該方法進一步包含:檢查該分配項目以藉由判定該分配項目是否含有一追蹤項目指標而判定該分配項目是否空閒而能夠自由使用;及若該分配項目係空閒的,則以該記憶體追蹤表之該追蹤項目的一位址更新該分配項目。
  13. 如請求項12之機器可讀儲存媒體,其中該方法進一步包含: 若該分配項目係空閒的,則檢查該記憶體追蹤表之該追蹤項目以判定該記憶體分配計數是否大於一預定值;及若該記憶體分配計數大於該預定值,則判定該用戶端是否為該記憶體追蹤表之該追蹤項目的同一擁有者,其中若該用戶端為該追蹤項目之同一擁有者,則該追蹤項目之該記憶體分配計數遞增。
  14. 如請求項12之機器可讀儲存媒體,該方法進一步包含:若該分配項目不空閒,其參照至一現有追蹤項目,則判定該用戶端是否為該記憶體追蹤表之該追蹤項目之同一擁有者;若該用戶端並非為同一擁有者,則將該現有追蹤項目之一記憶體分配計數遞減;及以該追蹤項目之一位址更新該記憶體分配表之該分配項目。
  15. 一種資料處理系統,其包含:一記憶體,其用以儲存一記憶體分配表及一記憶體追蹤表;及一記憶體分配模組,其用以基於表示分配給一用戶端之一記憶體區塊之一記憶體位址的一控制代碼在一記憶體分配表中執行一第一查找操作以識別一分配項目並自該分配項目擷取一追蹤項目指標,其中該記憶體分配模組經組態以基於該追蹤項目指標在該記憶體追蹤表中執行一第二查找操作以識別一追蹤項目並將該追蹤項目之一記憶體分配計數遞增,其中該記憶體分配計數用以指 示該用戶端引起一記憶體流失之一可能性。
  16. 如請求項15之系統,其中該用戶端係經由一程式之可執行程式碼之一序列的一回溯追蹤來識別,且其中基於該回溯追蹤之一雜湊值在該記憶體追蹤表中索引該追蹤項目。
  17. 如請求項15之系統,其中基於該控制代碼之一雜湊值來索引該記憶體分配表之該分配項目。
  18. 如請求項15之系統,其中該記憶體分配模組經組態以:檢查該分配項目以藉由判定該分配項目是否含有一追蹤項目指標而判定該分配項目是否空閒而能夠自由使用;且若該分配項目係空閒的,則以該記憶體追蹤表之該追蹤項目的一位址更新該分配項目。
  19. 如請求項18之系統,其中該記憶體分配模組經組態以:若該分配項目係空閒的,則檢查該記憶體追蹤表之該追蹤項目以判定該記憶體分配計數是否大於一預定值;且若該記憶體分配計數大於該預定值,則判定該用戶端是否為該記憶體追蹤表之該追蹤項目的同一擁有者,其中若該用戶端為該追蹤項目之同一擁有者,則該追蹤項目之該記憶體分配計數遞增。
  20. 如請求項19之系統,其中該記憶體分配模組經組態以:若該分配項目不空閒,其參照至一現有追蹤項目,則判定該用戶端是否為該記憶體追蹤表之該追蹤項目之同一擁有者;且 若該用戶端並非為同一擁有者,則將該現有追蹤項目之一記憶體分配計數遞減;及以該追蹤項目之一位址更新該記憶體分配表之該分配項目。
TW101136089A 2011-11-18 2012-09-28 追蹤一資料處理系統的記憶體使用率之方法 TWI456395B (zh)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US13/300,144 US8626993B2 (en) 2011-11-18 2011-11-18 Method for tracking memory usages of a data processing system

Publications (2)

Publication Number Publication Date
TW201321980A TW201321980A (zh) 2013-06-01
TWI456395B true TWI456395B (zh) 2014-10-11

Family

ID=47044823

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101136089A TWI456395B (zh) 2011-11-18 2012-09-28 追蹤一資料處理系統的記憶體使用率之方法

Country Status (7)

Country Link
US (2) US8626993B2 (zh)
EP (1) EP2657844B1 (zh)
JP (1) JP5425286B2 (zh)
KR (1) KR101357397B1 (zh)
CN (1) CN103123604B (zh)
TW (1) TWI456395B (zh)
WO (1) WO2013074201A1 (zh)

Families Citing this family (36)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8959442B2 (en) * 2010-06-11 2015-02-17 Microsoft Corporation Memory allocation visualization for unmanaged languages
US10417121B1 (en) * 2011-12-19 2019-09-17 Juniper Networks, Inc. Monitoring memory usage in computing devices
US8707108B1 (en) * 2012-01-20 2014-04-22 Amazon Technologies, Inc. Detecting memory failures in computing systems
US9275229B2 (en) * 2012-03-15 2016-03-01 Mandiant, Llc System to bypass a compromised mass storage device driver stack and method thereof
GB2506614A (en) * 2012-10-03 2014-04-09 Ibm Extracting core data for a summary dump file based upon most recent trace data entries
US9298521B1 (en) * 2013-04-29 2016-03-29 Seagate Technology Llc Command sets and functions
US9164872B2 (en) * 2013-05-22 2015-10-20 Sap Se Tracking of program objects during request processing
US9424027B2 (en) 2013-07-29 2016-08-23 Ralph Moore Message management system for information transfer within a multitasking system
US9690687B2 (en) * 2013-12-17 2017-06-27 International Business Machines Corporation Dynamic allocation of trace array timestamp data
CN104750605B (zh) * 2013-12-30 2018-08-14 伊姆西公司 将内核对象信息包括在用户转储中
EP3155522B1 (en) * 2014-06-13 2020-10-21 Pivotal Software, Inc. Precisely tracking memory usage in multi-process computing environment
JP6428005B2 (ja) * 2014-07-10 2018-11-28 富士通株式会社 情報処理装置,情報処理方法及び情報処理プログラム
CN105302734B (zh) * 2014-07-22 2018-04-06 北京畅游天下网络技术有限公司 内存管理系统和方法
CN105446871B (zh) * 2014-08-26 2018-08-17 华为技术有限公司 一种资源泄漏检测方法、装置及系统
US9471237B1 (en) 2015-02-04 2016-10-18 Amazon Technologies, Inc. Memory consumption tracking
US10757175B2 (en) * 2015-02-10 2020-08-25 Vmware, Inc. Synchronization optimization based upon allocation data
CN106294189B (zh) * 2015-05-25 2020-09-25 中兴通讯股份有限公司 内存碎片整理方法及装置
US10942683B2 (en) * 2015-10-28 2021-03-09 International Business Machines Corporation Reducing page invalidation broadcasts
CN105260314B (zh) * 2015-11-03 2018-06-29 上海斐讯数据通信技术有限公司 内存泄漏的监测方法
EP3200080B1 (en) * 2015-12-16 2021-12-22 Tata Consultancy Services Limited Methods and systems for memory suspect detection
WO2017131780A1 (en) * 2016-01-29 2017-08-03 Hewlett Packard Enterprise Development Lp Identifying object modifications
US20170249176A1 (en) * 2016-02-26 2017-08-31 Red Hat, Inc. Systems and methods for configuration knowledge search
US10223295B2 (en) * 2016-03-10 2019-03-05 Microsoft Technology Licensing, Llc Protected pointers
US11061572B2 (en) 2016-04-22 2021-07-13 Advanced Micro Devices, Inc. Memory object tagged memory monitoring method and system
US10037166B2 (en) * 2016-08-03 2018-07-31 Ge Aviation Systems Llc Tracking memory allocation
US10180799B2 (en) * 2017-02-02 2019-01-15 Microsoft Technology Licensing, Llc Efficient retrieval of memory values during trace replay
US10331446B2 (en) * 2017-05-23 2019-06-25 International Business Machines Corporation Generating and verifying hardware instruction traces including memory data contents
US11074200B2 (en) * 2017-12-15 2021-07-27 Intel Corporation Use-after-free exploit prevention architecture
KR102536266B1 (ko) * 2018-08-02 2023-05-25 삼성전자주식회사 메모리 누수 검출 방법 및 그 전자 장치
US11720993B2 (en) * 2018-09-21 2023-08-08 Advanced Micro Devices, Inc. Dynamic kernel memory space allocation
US10817413B2 (en) 2018-12-11 2020-10-27 Nxp Usa, Inc. Hardware-based memory management for system-on-chip (SoC) integrated circuits that identify blocks of continuous available tokens needed to store data
CN110162449A (zh) * 2019-03-26 2019-08-23 北京海益同展信息科技有限公司 互联网数据中心巡检过程中数据存储方法和装置
US11307923B2 (en) * 2019-07-23 2022-04-19 Vmware, Inc. Memory leak detection
CN111258847B (zh) * 2020-01-13 2023-08-22 北京字节跳动网络技术有限公司 一种文件句柄监控及分析方法、装置、介质和设备
US11507559B2 (en) * 2020-05-25 2022-11-22 Hewlett Packard Enterprise Development Lp Object sharing by entities using a data structure
US11442832B2 (en) * 2020-11-24 2022-09-13 Hewlett Packard Enterprise Development Lp Managing synchronized reboot of a system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030002194A1 (en) * 2001-05-17 2003-01-02 Fujitsu Limited Record and playback apparatus, and the method
US7246139B2 (en) * 2001-11-08 2007-07-17 Fujitsu Limited File system for enabling the restoration of a deffective file
US20070226445A1 (en) * 2006-03-22 2007-09-27 Tony Nichols Method and system for rapid data-fragmentation analysis of a file-allocation-table (FAT) file system
US20100153352A1 (en) * 2008-12-16 2010-06-17 Judah Gamliel Hahn Discardable files
TWI338837B (zh) * 2006-12-28 2011-03-11 Genesys Logic Inc

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0962565A (ja) * 1995-08-30 1997-03-07 Matsushita Graphic Commun Syst Inc メモリ管理方法およびメモリ管理装置
US5689707A (en) * 1995-12-04 1997-11-18 Ncr Corporation Method and apparatus for detecting memory leaks using expiration events and dependent pointers to indicate when a memory allocation should be de-allocated
JP3735484B2 (ja) * 1999-04-08 2006-01-18 日本電気株式会社 メモリリーク検出システム、メモリリーク検出方法及び記録媒体
US6658652B1 (en) 2000-06-08 2003-12-02 International Business Machines Corporation Method and system for shadow heap memory leak detection and other heap analysis in an object-oriented environment during real-time trace processing
US20020163913A1 (en) 2001-05-07 2002-11-07 Jintae Oh Pointer management and content matching packet classification
CN1248114C (zh) * 2002-06-20 2006-03-29 华为技术有限公司 一种软件内存泄露的检查方法
US6883082B2 (en) 2002-12-19 2005-04-19 Lsi Logic Corporation Central dynamic memory manager
CN100530110C (zh) * 2005-12-08 2009-08-19 中兴通讯股份有限公司 嵌入式系统中自动监测内存泄漏与内存越界的系统
CN100504807C (zh) * 2006-10-13 2009-06-24 中兴通讯股份有限公司 一种通信设备系统中内存泄漏的检测方法
CN101539870A (zh) * 2008-03-21 2009-09-23 中兴通讯股份有限公司 内存泄漏检测装置及方法
CN101615143B (zh) * 2008-06-27 2013-04-17 国际商业机器公司 用于内存泄漏诊断的方法和装置
CN101763305B (zh) * 2009-12-29 2011-12-14 青岛海信宽带多媒体技术有限公司 一种嵌入式系统内存泄露的检测方法
US8233390B2 (en) 2010-02-22 2012-07-31 Telefonaktiebolaget L M Ericsson (Publ) Priority and source aware packet memory reservation and flow control in forwarding planes
CN102073591A (zh) * 2011-01-14 2011-05-25 福建星网视易信息系统有限公司 嵌入式系统内存占用状况检测方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030002194A1 (en) * 2001-05-17 2003-01-02 Fujitsu Limited Record and playback apparatus, and the method
US7246139B2 (en) * 2001-11-08 2007-07-17 Fujitsu Limited File system for enabling the restoration of a deffective file
US20070226445A1 (en) * 2006-03-22 2007-09-27 Tony Nichols Method and system for rapid data-fragmentation analysis of a file-allocation-table (FAT) file system
TWI338837B (zh) * 2006-12-28 2011-03-11 Genesys Logic Inc
US20100153352A1 (en) * 2008-12-16 2010-06-17 Judah Gamliel Hahn Discardable files

Also Published As

Publication number Publication date
US8949518B2 (en) 2015-02-03
KR20130055515A (ko) 2013-05-28
WO2013074201A1 (en) 2013-05-23
CN103123604B (zh) 2015-09-09
JP5425286B2 (ja) 2014-02-26
EP2657844A3 (en) 2016-05-25
EP2657844A2 (en) 2013-10-30
US8626993B2 (en) 2014-01-07
JP2013109756A (ja) 2013-06-06
CN103123604A (zh) 2013-05-29
EP2657844B1 (en) 2020-09-09
KR101357397B1 (ko) 2014-02-03
US20140089627A1 (en) 2014-03-27
US20130132699A1 (en) 2013-05-23
TW201321980A (zh) 2013-06-01

Similar Documents

Publication Publication Date Title
TWI456395B (zh) 追蹤一資料處理系統的記憶體使用率之方法
CN108153757B (zh) 一种哈希表管理的方法和装置
US9372867B2 (en) Similarity analysis method, apparatus, and system
JP2014502762A5 (zh)
US20140379677A1 (en) Test sandbox in production systems during productive use
RU2015104116A (ru) Способ и устройство хранения для распределенной файловой системы
RU2014118856A (ru) Определение длины группы символьных данных, содержащей символ окончания
US20160253425A1 (en) Bloom filter based log data analysis
JP2015521310A5 (zh)
JP2012523055A5 (zh)
US10353820B2 (en) Low-overhead index for a flash cache
WO2017005094A1 (zh) 一种数据查询方法和装置
JP2014041452A (ja) 重複除去装置、重複除去方法及び重複除去プログラム
GB2581938A (en) Configuration state registers grouped based on functional affinity
JP2019512143A5 (zh)
US20130185536A1 (en) Hash-based managing of storage identifiers
US20130117302A1 (en) Apparatus and method for searching for index-structured data including memory-based summary vector
US20140365445A1 (en) Server with file managing function and file managing method
CN107193498B (zh) 一种对数据进行去重复处理的方法及装置
RU2011152760A (ru) Оптимизации кода с использованием компилятора с двумя порядками следования байтов
CN106598881B (zh) 页面处理方法及装置
JP2014241009A5 (zh)
US20180322067A1 (en) Persistent virtual address spaces
US20130339666A1 (en) Special case register update without execution
CN108614781B (zh) 基于NANDflash的有效数据查找方法和NANDflash存储设备