@@ -1577,47 +1577,6 @@ mono_gc_is_null (void)
15771577 return FALSE;
15781578}
15791579
1580- /**
1581- * mono_gchandle_is_in_domain:
1582- * \param gchandle a GCHandle's handle.
1583- * \param domain An application domain.
1584- *
1585- * Use this function to determine if the \p gchandle points to an
1586- * object allocated in the specified \p domain.
1587- *
1588- * \returns TRUE if the object wrapped by the \p gchandle belongs to the specific \p domain.
1589- */
1590- gboolean
1591- mono_gchandle_is_in_domain (MonoGCHandle gch , MonoDomain * domain )
1592- {
1593- guint32 gchandle = MONO_GC_HANDLE_TO_UINT (gch );
1594- guint slot = MONO_GC_HANDLE_SLOT (gchandle );
1595- guint type = MONO_GC_HANDLE_TYPE (gchandle );
1596- HandleData * handles = & gc_handles [type ];
1597- gboolean result = FALSE;
1598-
1599- if (type >= HANDLE_TYPE_MAX )
1600- return FALSE;
1601-
1602- lock_handles (handles );
1603- if (slot < handles -> size && slot_occupied (handles , slot )) {
1604- if (MONO_GC_HANDLE_TYPE_IS_WEAK (handles -> type )) {
1605- result = domain -> domain_id == handles -> domain_ids [slot ];
1606- } else {
1607- MonoObject * obj ;
1608- obj = (MonoObject * )handles -> entries [slot ];
1609- if (obj == NULL )
1610- result = TRUE;
1611- else
1612- result = domain == mono_object_domain (obj );
1613- }
1614- } else {
1615- /* print a warning? */
1616- }
1617- unlock_handles (handles );
1618- return result ;
1619- }
1620-
16211580/**
16221581 * mono_gchandle_free_internal:
16231582 * \param gchandle a GCHandle's handle.
@@ -1659,43 +1618,6 @@ mono_gchandle_free_internal (MonoGCHandle gch)
16591618 MONO_PROFILER_RAISE (gc_handle_deleted , (gchandle , (MonoGCHandleType )handles -> type ));
16601619}
16611620
1662- /**
1663- * mono_gchandle_free_domain:
1664- * \param domain domain that is unloading
1665- *
1666- * Function used internally to cleanup any GC handle for objects belonging
1667- * to the specified domain during appdomain unload.
1668- */
1669- void
1670- mono_gchandle_free_domain (MonoDomain * domain )
1671- {
1672- guint type ;
1673-
1674- for (type = HANDLE_TYPE_MIN ; type < HANDLE_PINNED ; ++ type ) {
1675- guint slot ;
1676- HandleData * handles = & gc_handles [type ];
1677- lock_handles (handles );
1678- for (slot = 0 ; slot < handles -> size ; ++ slot ) {
1679- if (!slot_occupied (handles , slot ))
1680- continue ;
1681- if (MONO_GC_HANDLE_TYPE_IS_WEAK (type )) {
1682- if (domain -> domain_id == handles -> domain_ids [slot ]) {
1683- vacate_slot (handles , slot );
1684- if (handles -> entries [slot ])
1685- mono_gc_weak_link_remove (& handles -> entries [slot ], handles -> type == HANDLE_WEAK_TRACK );
1686- }
1687- } else {
1688- if (handles -> entries [slot ] && mono_object_domain (handles -> entries [slot ]) == domain ) {
1689- vacate_slot (handles , slot );
1690- handles -> entries [slot ] = NULL ;
1691- }
1692- }
1693- }
1694- unlock_handles (handles );
1695- }
1696-
1697- }
1698-
16991621guint64
17001622mono_gc_get_total_allocated_bytes (MonoBoolean precise )
17011623{
0 commit comments