/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
#ifdefined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1 # error "This header should only be included by freestanding code" #endif// defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1
/** *Sincethislibraryistheonlypartoffirefox.exethatneedsspecial *treatmentwithrespecttotheheap,weimplement|RtlNew|and|RtlDelete| *tobeusedinsteadof|new|and|delete|foranyheapallocationsinside *thefreestandinglibrary.
*/ template <typename T, typename... Args>
inline static T* RtlNew(Args&&... aArgs) {
HANDLE processHeap = nt::RtlGetProcessHeap();
if (!processHeap) { // Handle the case where the process heap is not initialized because // passing nullptr to RtlAllocateHeap crashes the process. return nullptr;
}
} // namespace freestanding
} // namespace mozilla
// Initialization code for all statically-allocated data in freestanding is // placed into a separate section. This allows us to initialize any // freestanding statics without needing to initialize everything else in this // binary. #pragma init_seg(".freestd$g")
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.