 《深入浅出MFC》2/ewc.hCursor = LoadCursor(NULL, IDC_ARROW); #0057 wc.hbrBackground = GetStockObject(WHITE_BRUSH); // #0058 wc.lpszMenuName = "GenericMenu"; // .RC #0059 wc.lpszClassName "jjhouricon"); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = GetStockObject(WHITE_BRUSH); wc.lpszMenuName = "GenericMenu"; wc.lpszClassName = "Generic"; RegisterClass(&wc); HWND 实上执行线程才是排程单位。 核心对象 首先让我解释什么叫作「核心对象」(kernel object)。「GDI 对象」是大家比较熟悉的 东西,我们利用GDI 函数所产生的一支笔(Pen)或一支刷(Brush)都是所谓的「GDI 对象」。但什么又是「核心对象」呢? 你可以说核心对象是系统的一种资源(噢,这说法对GDI 对象也适用),系统对象一 旦产生,任何应用程序都可以开启并使用该对象。系统给予核心对象一个计数值(usage0 码力 | 1009 页 | 11.08 MB | 1 年前3 《深入浅出MFC》2/ewc.hCursor = LoadCursor(NULL, IDC_ARROW); #0057 wc.hbrBackground = GetStockObject(WHITE_BRUSH); // #0058 wc.lpszMenuName = "GenericMenu"; // .RC #0059 wc.lpszClassName "jjhouricon"); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = GetStockObject(WHITE_BRUSH); wc.lpszMenuName = "GenericMenu"; wc.lpszClassName = "Generic"; RegisterClass(&wc); HWND 实上执行线程才是排程单位。 核心对象 首先让我解释什么叫作「核心对象」(kernel object)。「GDI 对象」是大家比较熟悉的 东西,我们利用GDI 函数所产生的一支笔(Pen)或一支刷(Brush)都是所谓的「GDI 对象」。但什么又是「核心对象」呢? 你可以说核心对象是系统的一种资源(噢,这说法对GDI 对象也适用),系统对象一 旦产生,任何应用程序都可以开启并使用该对象。系统给予核心对象一个计数值(usage0 码力 | 1009 页 | 11.08 MB | 1 年前3
 Single Producer Single Consumer Lock-free FIFO From the Ground Upthread will make progress. ● Wait-free: each thread moves forward regardless of other threads. ● [Circular] Fifo [or Queue]: a single, fixed-size buffer as if it were connected end-to-end. The oldest entry a pipelinePush cursor Pop cursor 6 Circular Fifo - PushPush cursor Pop cursor 42 7 42 Circular Fifo - PushPush cursor Pop cursor 42 43 8 43 42 Circular Fifo - PushPush cursor Pop cursor 42 9 46 43 42 47 48 49 49 44 45 47 48 46 Circular Fifo - PushPush cursor Pop cursor 43 44 45 10 46 43 47 48 49 49 44 45 47 48 46 Circular Fifo - PopPush cursor Pop cursor 44 45 110 码力 | 51 页 | 546.30 KB | 6 月前3 Single Producer Single Consumer Lock-free FIFO From the Ground Upthread will make progress. ● Wait-free: each thread moves forward regardless of other threads. ● [Circular] Fifo [or Queue]: a single, fixed-size buffer as if it were connected end-to-end. The oldest entry a pipelinePush cursor Pop cursor 6 Circular Fifo - PushPush cursor Pop cursor 42 7 42 Circular Fifo - PushPush cursor Pop cursor 42 43 8 43 42 Circular Fifo - PushPush cursor Pop cursor 42 9 46 43 42 47 48 49 49 44 45 47 48 46 Circular Fifo - PushPush cursor Pop cursor 43 44 45 10 46 43 47 48 49 49 44 45 47 48 46 Circular Fifo - PopPush cursor Pop cursor 44 45 110 码力 | 51 页 | 546.30 KB | 6 月前3
 Back to Basics Unit Testingyour mocks changing to match changes in the real thing? Plus, have you tested your Mocks? Beware circular reasoning! Test Doubles are accuracy / precision tradeoffs 31Accuracy in science Accuracy: measurements give bugs no place to hide Test Correctly : correct statement of "right" answer Test Validity: no circular logic or unfalsifiable tests Part 1: Testing Accuracy 33Completeness The full story: Wiley & mistake hides the other 66Fundamentally if we only test via the public interface, we have a circular-logic problem: you have to use the interface to test the interface, so at some point you have0 码力 | 109 页 | 4.13 MB | 6 月前3 Back to Basics Unit Testingyour mocks changing to match changes in the real thing? Plus, have you tested your Mocks? Beware circular reasoning! Test Doubles are accuracy / precision tradeoffs 31Accuracy in science Accuracy: measurements give bugs no place to hide Test Correctly : correct statement of "right" answer Test Validity: no circular logic or unfalsifiable tests Part 1: Testing Accuracy 33Completeness The full story: Wiley & mistake hides the other 66Fundamentally if we only test via the public interface, we have a circular-logic problem: you have to use the interface to test the interface, so at some point you have0 码力 | 109 页 | 4.13 MB | 6 月前3
 What's Eating my RAM?new() it, then forget it 2. Keep entries that are no longer needed 3. Missing virtual ~Base() 4. Circular reference Reference counting: maintain a count of the smart pointers that point to the same object new() it, then forget it 2. Keep entries that are no longer needed 3. Missing virtual ~Base() 4. Circular reference …🔍How to detect memory leaks?Memory Leaks: Tools Tool What How bslma::TestAllocator0 码力 | 88 页 | 3.49 MB | 6 月前3 What's Eating my RAM?new() it, then forget it 2. Keep entries that are no longer needed 3. Missing virtual ~Base() 4. Circular reference Reference counting: maintain a count of the smart pointers that point to the same object new() it, then forget it 2. Keep entries that are no longer needed 3. Missing virtual ~Base() 4. Circular reference …🔍How to detect memory leaks?Memory Leaks: Tools Tool What How bslma::TestAllocator0 码力 | 88 页 | 3.49 MB | 6 月前3
 Scientific Unit TestingIsEmpty() ); // test this. }; 7Fundamentally if we only test via the public interface, we have a circular-logic problem: you have to use the interface to test the interface, so at some point you have0 码力 | 45 页 | 1.91 MB | 6 月前3 Scientific Unit TestingIsEmpty() ); // test this. }; 7Fundamentally if we only test via the public interface, we have a circular-logic problem: you have to use the interface to test the interface, so at some point you have0 码力 | 45 页 | 1.91 MB | 6 月前3
 Shared Librariesbinaries against it. • Linux: • Just put it in the executable 20C++ Implication #3: Can you have circular library dependencies? • Linux: • Yes • Windows • No. • Well, you’d have to hack hard. • The0 码力 | 69 页 | 1.40 MB | 6 月前3 Shared Librariesbinaries against it. • Linux: • Just put it in the executable 20C++ Implication #3: Can you have circular library dependencies? • Linux: • Yes • Windows • No. • Well, you’d have to hack hard. • The0 码力 | 69 页 | 1.40 MB | 6 月前3
 Tracy: A Profiler You Don't Want to MissProfiler not showing the name of some zones: getting ??? instead• Tracy never drops events! (there’s no circular/LRU event queue) • If profiler is not connected, application memory keeps growing! • If profiler0 码力 | 84 页 | 8.70 MB | 6 月前3 Tracy: A Profiler You Don't Want to MissProfiler not showing the name of some zones: getting ??? instead• Tracy never drops events! (there’s no circular/LRU event queue) • If profiler is not connected, application memory keeps growing! • If profiler0 码力 | 84 页 | 8.70 MB | 6 月前3
 Tracy: A Profiler You Don't Want to MissProfiler not showing the name of some zones: getting ??? instead• Tracy never drops events! (there’s no circular/LRU event queue) • If profiler is not connected, application memory keeps growing! • If profiler0 码力 | 85 页 | 6.51 MB | 6 月前3 Tracy: A Profiler You Don't Want to MissProfiler not showing the name of some zones: getting ??? instead• Tracy never drops events! (there’s no circular/LRU event queue) • If profiler is not connected, application memory keeps growing! • If profiler0 码力 | 85 页 | 6.51 MB | 6 月前3
 Back to Basics: Templates - Part 120 template Back to Basics: Templates - Part 120 template- inline constexpr T pi = T(3.1415926535897932385L); template - T circular_area(T r) { return pi - * r * r; } template< class T > inline constexpr bool is_arithmetic_v 0 码力 | 68 页 | 436.75 KB | 6 月前3
 C++20 Modules: The Packaging and Binary Redistribution Storycalculate the right build order: ○ We know which sources produce which files ● New constraints: ○ No circular dependencies between imports (no cycles in the graph) ○ Build tool should be able to re-order dependencies0 码力 | 76 页 | 2.09 MB | 6 月前3 C++20 Modules: The Packaging and Binary Redistribution Storycalculate the right build order: ○ We know which sources produce which files ● New constraints: ○ No circular dependencies between imports (no cycles in the graph) ○ Build tool should be able to re-order dependencies0 码力 | 76 页 | 2.09 MB | 6 月前3
共 41 条
- 1
- 2
- 3
- 4
- 5













