Creating a Sender/Receiver HTTP Servercom © 2024 Bloomberg Finance L.P. All rights reserved. • Create a basic HTTP server. • Allow a single-threaded server handling multiple clients. • Use the sender/receiver asynchronous framework.0 码力 | 8 页 | 2.19 MB | 6 月前3
Techniques to Optimise Multi-threaded Data Building During Game Development- PNG, FBX, JSON More common with indie games ▶ Maximal extreme Large process - requires entire server farm Creates lots of data - even more to process Outputs optimised binary files - loaded quickly into regions - process as separate tasks Changing one region should not affect others Some tasks will take longer - more data to process in region Hope all jobs are similar in size If not then small jobs requires having quick access to static world data Many regions of the world - many tasks for each region Need to prevent everyone from duplicating work - and code ▶ Traditionally use one of tree structures0 码力 | 99 页 | 2.40 MB | 6 月前3
Concurrency Patterns IstrategizedLockingCompileTimeWithConcepts.cppThread-Save Interface The thread-save interface extends the critical region to an object. ▪ Antipattern: Each member function uses a lock internally. ▪ The performance of Only the access to the activation list has to be synchronized ▪ Clear separation of client and server ▪ Improved throughput due to the asynchronous execution ▪ The scheduler can use various execution0 码力 | 39 页 | 1.14 MB | 6 月前3
《深入浅出MFC》2/e的\DEVSTUDIO\VC\MFC\SAMPLES\SCRIBBLE 目录中 找到。本书只采用Step1~Step5,并增列Step0。Step6 是OnLine Help 的制 作,Step7 是OLE Server 的制作,这两个主题本书从缺。 Scribble Step0-由MFC AppWizard 做出来的空壳程序,也就是所谓的MFC 骨 干程序。完整源代码列于第4章「东圈西点完成程序骨干」一节。完整解说出 情况: 当使用者的一个鼠标动作可能引发许多许多程序绘图动作时,绘图效率就变得非常重 要。因此在考量如何加强显示能力时,我们就得设计所谓的「必要绘图区」,也就是 所谓的Invalidate Region(不再适用的区域)。事实上每当使用者开始绘图(增加新 的线条),程序可以设定「必要绘图区」为:该线条之最小外围四方形。为了记录这 项数据,Step1 所设计并延续至今的Document 数据结构必须改变。 第㆓篇 欲善工事先利其器 226 � ATL COM(ActiveX Template Library Component Object Model) � ISAPI(Internet Server API)Extension Application � Win32 Static Library 图4-3 是VC++ 5.0 专业版安装完成后的程序群组,打开Win95 的【开始/程序集】便0 码力 | 1009 页 | 11.08 MB | 1 年前3
Back to Basics Castingbrian.ruth@garmin.comAn Introduction struct region { int size; }; void init_region(char* backing_buffer, size_t buffer_size ) { if(buffer_size < current_region.size) { LOG(“Buffer size too small”); return; //other init code }An Introduction struct region { int size; }; void init_region(char* backing_buffer, size_t buffer_size ) { if(buffer_size < current_region.size) { LOG(“Buffer size too small”); return; //other init code }An Introduction struct region { int size; }; void init_region(char* backing_buffer, size_t buffer_size ) { if(buffer_size < (size_t)current_region.size) { LOG(“Buffer size too small”);0 码力 | 117 页 | 1.57 MB | 6 月前3
What's Eating my RAM?(Chunks) malloc Arena: a structure that is shared among one or more threads Heap: a contiguous region of memory subdivided into chunks Chunk: a range of memory of various sizes allocated to the applicationHow Arena malloc Arena: a structure that is shared among one or more threads Heap: a contiguous region of memory subdivided into chunks Chunk: a range of memory of various sizes allocated to the applicationHow Arena #2 malloc Arena: a structure that is shared among one or more threads Heap: a contiguous region of memory subdivided into chunks Chunk: a range of memory of various sizes allocated to the applicationHow0 码力 | 88 页 | 3.49 MB | 6 月前3
2020: The Year of Sanitizers?00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18004cec0) 0x12ac01b801d0 is located 0 bytes to the right of 400-byte region [0x12ac01b80040,0x12ac01b801d0) allocated by thread T0 here: #0 0x7ffe83be7e91 in _asan_loadN_noabort+0x55555 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone:0 码力 | 135 页 | 27.77 MB | 6 月前3
What Volatile Means (and Doesn't Mean)toolchains allow you to disable all optimizations for a region of code, which is one way to avoid this problem. Disabling all optimizations for a region of code can be overkill. You’ll probably also lose Non-Volatile Operations volatiledisables optimizations for a specific object rather than for a region of code. The compiler can still optimize accesses to non-volatile objects in the surrounding0 码力 | 32 页 | 901.80 KB | 6 月前3
Khronos APIs for Heterogeneous Compute and Safety: SYCL and SYCL SCthe host and device(s) in a span of bytes Pointers within that region of memory can freely point to any other address in the region Easier to port existing C/C++ code to SYCLMemory is allocated manuallySome platforms will support variants of USM where memory allocations share the same memory region between the host and device(s) No explicit routines are required to move the dataExplicit USM0 码力 | 82 页 | 3.35 MB | 6 月前3
Back to Basics: Concurrencyis doing is providing access to only one thread at a time (mutually exclusive access). ○ This region is called the ‘critical section’ that is protected by the lock. ○ Critical because we only want is doing is providing access to only one thread at a time (mutually exclusive access). ○ This region is called the ‘critical section’ that is protected by the lock. ○ Critical because we only want is doing is providing access to only one thread at a time (mutually exclusive access). ○ This region is called the ‘critical section’ that is protected by the lock. ○ Critical because we only want0 码力 | 141 页 | 6.02 MB | 6 月前3
共 121 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13













