انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهMID-002-L07

عرض عملي: اكتشاف تسرّب بلقطتين للـ Heap

  • الدرس 7 من 7
  • Mid-level
في هذا الدرس 3 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

locate a leak by diffing dumps; prepares MID-002-LAB1.

تفاصيل المخطط المبدئي

خطوة بخطوة

  1. Start Shop with GC logging and the planted cache; run steady load.
  2. Confirm in the log that the post-GC floor keeps rising.
  3. Take dump A (jcmd <pid> GC.heap_dump a.hprof), run load a few more minutes, take dump B.
  4. Open both in Eclipse MAT or VisualVM; compare histograms and find the class with growing instance count.
  5. Planned mistake: raise -Xmx first and declare it fixed because the crash is later. Fix: follow the path to GC roots (dominator tree, "path to GC roots") to the static map.
  6. Bound the cache (size limit/eviction), rerun, and show a flat floor.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.