[2020-02] Fix leak in assembly-specific dllmap lookups (#21053)
[mono-project.git] / mono / metadata / loaded-images-netcore.c
blob3d15afd5b9be64f98a7882ea0b1633ec4faa7d71
1 #include "config.h"
3 #include "mono/metadata/loaded-images-internals.h"
5 #ifdef ENABLE_NETCORE
6 /* Should be compiling loaded-images-netcore.c only for netcore Mono */
8 // This is support for the mempool reference tracking feature in checked-build,
9 // but lives in loaded-images-netcore.c due to use of static variables of this
10 // file.
12 /**
13 * mono_find_image_owner:
15 * Find the image, if any, which a given pointer is located in the memory of.
17 MonoImage *
18 mono_find_image_owner (void *ptr)
20 /* FIXME: this function is a bit annoying to implement without a global
21 * table of all the loaded images. We need to traverse all the domains
22 * and each ALC in each domain. */
23 return NULL;
26 MonoLoadedImages *
27 mono_alc_get_loaded_images (MonoAssemblyLoadContext *alc)
29 g_assert (alc);
30 g_assert (alc->loaded_images);
31 return alc->loaded_images;
34 #else
36 MONO_EMPTY_SOURCE_FILE (loaded_images_netcore);
38 #endif /* ENABLE_NETCORE */