随笔分类 -  Windows

Memory leak detector(C++)
摘要:Memory leak detector(C++)This is a simple solution for memory leak detector.For any C++ software source under windows, please follow these steps: 1. You need to put MemoryTracker.h and MemoryAllocateTracker.h into include folder, and force all *.cpp file to include MemoryTracker.h first(when using M 阅读全文
posted @ 2011-05-20 15:16 sun_kang 阅读(2156) 评论(0) 推荐(0)
NT kernel & reactos related Links
摘要:NT kernel resourceshttp://www.alex-ionescu.com/http://doxygen.reactos.org/http://www.alex-ionescu.com/wloo-talk.pdfIntroduction to NT Internals.pdfhttp://www.openrce.org/http://www.osronline.comNT kernel resource linkshttp://msdn.microsoft.com/en-us/magazine/default.aspxhttp://www.nondot.org/sabre/o 阅读全文
posted @ 2011-05-19 15:07 sun_kang 阅读(330) 评论(0) 推荐(0)
What Every Programmer Should Know About Memory
摘要:What Every Programmer Should Know About Memorywww.akkadia.org/drepper/cpumemory.pdf 6 What Programmers Can DoAfter the descriptions in the previous sections it is clear that there are many, many opportunities for programmers to influence a program's performance, positively or negatively. And thi 阅读全文
posted @ 2011-05-16 13:26 sun_kang 阅读(2256) 评论(0) 推荐(0)
Hardware breakpoints
摘要:A breakpoint is a mechanism to pause a program execution for further analysis during runtime to identify run-time errors. Pausing is required to examine the run-time values of variables. Examining these variables is possible only if they are valid in the current context. Various options will be prov 阅读全文
posted @ 2011-05-04 16:05 sun_kang 阅读(3114) 评论(0) 推荐(0)
Win32 结构化异常处理(SEH)探秘
摘要:Win32 结构化异常处理(SEH)探秘原著:Matt Pietrek原文出处:A Crash Course on the Depths of Win32? Structured Exception Handling 下载源代码 本文假设你熟悉 C++,Win32 摘要 Win32 结构化异常处理其核心是操作系统提供的服务,你能找到的关于 SEH 的所有文档都是描述一个特定的编译器运行时库,这个运行库包装着操作系统实现。在本文中,我将一层一层对 SEH 进行剥离,以便展现其最基本的概念。 在 Win32 操作系统提供的所有功能中,使用最广泛但最缺乏文档描述的也许就是结构化异常处理了(SEH), 阅读全文
posted @ 2011-04-29 16:53 sun_kang 阅读(3021) 评论(2) 推荐(2)
Difference between software interrupt, exception, trap
摘要:Definition and difference between Hardware interrupt, Software Interrupt, Exception, Trap and Signals?Answer:Interrupts can be categorized into two groups which are asynchronous interrupts (aka interrupt, hardware interrupt) and synchronous interrupts (aka exception). The former may arrive anytime, 阅读全文
posted @ 2011-04-29 10:15 sun_kang 阅读(719) 评论(0) 推荐(0)
驱动对象-设备对象-设备栈
摘要:用有限的几句话就舒舒服服的建立起对驱动对象和设备对象的概念是不可能的。刚开始是一片模糊,了解的多了,慢慢就清楚。下面的内容会使你对他们了解的清楚些。为了后面的叙述方便,首先列出驱动对象和设备对象的结构。驱动对象结构 DRIVER_OBJECT ,定义如下struct _DRIVER_OBJECT (sizeof=168)+00 int16 Type+02 int16 Size+04 struct _DEVICE_OBJECT *DeviceObject+08 uint32 Flags+0c void *DriverStart+10 uint32 DriverSize+14 void *Driv 阅读全文
posted @ 2011-04-19 15:26 sun_kang 阅读(626) 评论(0) 推荐(0)
Scheduling, Thread Context, and IRQL
摘要:Scheduling, Thread Context, andIRQLAbstractThis paper presents information about how thread scheduling, thread context, and a processor’s current interrupt request level (IRQL) affect the operation of kernel-mode drivers for the Microsoft® Windows® family of operating systems. It is intend 阅读全文
posted @ 2011-04-19 11:36 sun_kang 阅读(1072) 评论(0) 推荐(0)
Locks, Deadlocks, and Synchronization
摘要:Locks, Deadlocks, and SynchronizationApril 5, 2006AbstractThis paper explains how to use synchronization mechanisms to protect shared memory locations in kernel-mode drivers for the Microsoft® Windows® family of operating systems. By following the guidelines in this paper, driver writers w 阅读全文
posted @ 2011-04-19 11:31 sun_kang 阅读(1101) 评论(0) 推荐(0)
解开 Windows 下的临界区中的代码死锁
摘要:解开 Windows 下的临界区中的代码死锁Matt Pietrek和 Russ Osterlund 下载本文的代码:CriticalSections.exe (415KB) 摘要临界区是一种防止多个线程同时执行一个特定代码节的机制,这一主题并没有引起太多关注,因而人们未能对其深刻理解。在需要跟踪代码中的多线程处理的性能时,对 Windows 中临界区的深刻理解非常有用。 本文深入研究临界区的原理,以揭示在查找死锁和确认性能问题过程中的有用信息。它还包含一个便利的实用工具程序,可以显示所有临界区及其当前状态。在我们许多年的编程实践中,对于 Win32® 临界区没有受到非常多的“und 阅读全文
posted @ 2011-04-19 10:47 sun_kang 阅读(2020) 评论(0) 推荐(0)