mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 00:12:19 +01:00 
			
		
		
		
	Fixed size in g_memmove, reported by Alexander Larsson
1998-12-17 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * garray.c (g_ptr_array_remove_index): Fixed size in g_memmove, reported by Alexander Larsson <alla@lysator.liu.se>. * gmem.c: Fixed bug, that made compile fail for -DENABLE_MEM_PROFILE.
This commit is contained in:
		
				
					committed by
					
						 Sebastian Wilhelmi
						Sebastian Wilhelmi
					
				
			
			
				
	
			
			
			
						parent
						
							d9fca59e2a
						
					
				
				
					commit
					c3c1b2edc0
				
			| @@ -1,3 +1,10 @@ | ||||
| 1998-12-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de> | ||||
|  | ||||
| 	* garray.c (g_ptr_array_remove_index): Fixed size in g_memmove, | ||||
| 	reported by Alexander Larsson <alla@lysator.liu.se>. | ||||
|  | ||||
| 	* gmem.c: Fixed bug, that made compile fail for -DENABLE_MEM_PROFILE.  | ||||
|  | ||||
| Wed Dec 16 23:04:26 CST 1998 Shawn T. Amundson <amundson@gtk.org> | ||||
|  | ||||
| 	* Released GLib 1.1.9  | ||||
|   | ||||
| @@ -1,3 +1,10 @@ | ||||
| 1998-12-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de> | ||||
|  | ||||
| 	* garray.c (g_ptr_array_remove_index): Fixed size in g_memmove, | ||||
| 	reported by Alexander Larsson <alla@lysator.liu.se>. | ||||
|  | ||||
| 	* gmem.c: Fixed bug, that made compile fail for -DENABLE_MEM_PROFILE.  | ||||
|  | ||||
| Wed Dec 16 23:04:26 CST 1998 Shawn T. Amundson <amundson@gtk.org> | ||||
|  | ||||
| 	* Released GLib 1.1.9  | ||||
|   | ||||
| @@ -1,3 +1,10 @@ | ||||
| 1998-12-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de> | ||||
|  | ||||
| 	* garray.c (g_ptr_array_remove_index): Fixed size in g_memmove, | ||||
| 	reported by Alexander Larsson <alla@lysator.liu.se>. | ||||
|  | ||||
| 	* gmem.c: Fixed bug, that made compile fail for -DENABLE_MEM_PROFILE.  | ||||
|  | ||||
| Wed Dec 16 23:04:26 CST 1998 Shawn T. Amundson <amundson@gtk.org> | ||||
|  | ||||
| 	* Released GLib 1.1.9  | ||||
|   | ||||
| @@ -1,3 +1,10 @@ | ||||
| 1998-12-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de> | ||||
|  | ||||
| 	* garray.c (g_ptr_array_remove_index): Fixed size in g_memmove, | ||||
| 	reported by Alexander Larsson <alla@lysator.liu.se>. | ||||
|  | ||||
| 	* gmem.c: Fixed bug, that made compile fail for -DENABLE_MEM_PROFILE.  | ||||
|  | ||||
| Wed Dec 16 23:04:26 CST 1998 Shawn T. Amundson <amundson@gtk.org> | ||||
|  | ||||
| 	* Released GLib 1.1.9  | ||||
|   | ||||
| @@ -1,3 +1,10 @@ | ||||
| 1998-12-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de> | ||||
|  | ||||
| 	* garray.c (g_ptr_array_remove_index): Fixed size in g_memmove, | ||||
| 	reported by Alexander Larsson <alla@lysator.liu.se>. | ||||
|  | ||||
| 	* gmem.c: Fixed bug, that made compile fail for -DENABLE_MEM_PROFILE.  | ||||
|  | ||||
| Wed Dec 16 23:04:26 CST 1998 Shawn T. Amundson <amundson@gtk.org> | ||||
|  | ||||
| 	* Released GLib 1.1.9  | ||||
|   | ||||
| @@ -1,3 +1,10 @@ | ||||
| 1998-12-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de> | ||||
|  | ||||
| 	* garray.c (g_ptr_array_remove_index): Fixed size in g_memmove, | ||||
| 	reported by Alexander Larsson <alla@lysator.liu.se>. | ||||
|  | ||||
| 	* gmem.c: Fixed bug, that made compile fail for -DENABLE_MEM_PROFILE.  | ||||
|  | ||||
| Wed Dec 16 23:04:26 CST 1998 Shawn T. Amundson <amundson@gtk.org> | ||||
|  | ||||
| 	* Released GLib 1.1.9  | ||||
|   | ||||
| @@ -1,3 +1,10 @@ | ||||
| 1998-12-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de> | ||||
|  | ||||
| 	* garray.c (g_ptr_array_remove_index): Fixed size in g_memmove, | ||||
| 	reported by Alexander Larsson <alla@lysator.liu.se>. | ||||
|  | ||||
| 	* gmem.c: Fixed bug, that made compile fail for -DENABLE_MEM_PROFILE.  | ||||
|  | ||||
| Wed Dec 16 23:04:26 CST 1998 Shawn T. Amundson <amundson@gtk.org> | ||||
|  | ||||
| 	* Released GLib 1.1.9  | ||||
|   | ||||
| @@ -1,3 +1,10 @@ | ||||
| 1998-12-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de> | ||||
|  | ||||
| 	* garray.c (g_ptr_array_remove_index): Fixed size in g_memmove, | ||||
| 	reported by Alexander Larsson <alla@lysator.liu.se>. | ||||
|  | ||||
| 	* gmem.c: Fixed bug, that made compile fail for -DENABLE_MEM_PROFILE.  | ||||
|  | ||||
| Wed Dec 16 23:04:26 CST 1998 Shawn T. Amundson <amundson@gtk.org> | ||||
|  | ||||
| 	* Released GLib 1.1.9  | ||||
|   | ||||
							
								
								
									
										2
									
								
								garray.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								garray.c
									
									
									
									
									
								
							| @@ -338,7 +338,7 @@ g_ptr_array_remove_index (GPtrArray* farray, | ||||
|    | ||||
|   if (index != array->len - 1) | ||||
|     g_memmove (array->pdata + index, array->pdata + index + 1,  | ||||
| 	       array->len - index - 1); | ||||
| 	       sizeof (gpointer) * (array->len - index - 1)); | ||||
|    | ||||
|   array->pdata[array->len - 1] = NULL; | ||||
|  | ||||
|   | ||||
| @@ -338,7 +338,7 @@ g_ptr_array_remove_index (GPtrArray* farray, | ||||
|    | ||||
|   if (index != array->len - 1) | ||||
|     g_memmove (array->pdata + index, array->pdata + index + 1,  | ||||
| 	       array->len - index - 1); | ||||
| 	       sizeof (gpointer) * (array->len - index - 1)); | ||||
|    | ||||
|   array->pdata[array->len - 1] = NULL; | ||||
|  | ||||
|   | ||||
							
								
								
									
										12
									
								
								glib/gmem.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								glib/gmem.c
									
									
									
									
									
								
							| @@ -304,9 +304,9 @@ g_realloc (gpointer mem, | ||||
| #if defined(ENABLE_MEM_PROFILE) || defined(ENABLE_MEM_CHECK) | ||||
|       t = (gulong*) ((guchar*) mem - SIZEOF_LONG); | ||||
| #ifdef ENABLE_MEM_PROFILE | ||||
|       g_mutex_lock (mem_profile); | ||||
|       g_mutex_lock (mem_profile_lock); | ||||
|       freed_mem += *t; | ||||
|       g_mutex_unlock (mem_profile); | ||||
|       g_mutex_unlock (mem_profile_lock); | ||||
| #endif /* ENABLE_MEM_PROFILE */ | ||||
|       mem = t; | ||||
| #endif /* ENABLE_MEM_PROFILE || ENABLE_MEM_CHECK */ | ||||
| @@ -375,9 +375,9 @@ g_free (gpointer mem) | ||||
|       t = (gulong*) ((guchar*) mem - SIZEOF_LONG); | ||||
|       size = *t; | ||||
| #ifdef ENABLE_MEM_PROFILE      | ||||
|       g_mutex_lock (mem_profile); | ||||
|       g_mutex_lock (mem_profile_lock); | ||||
|       freed_mem += size; | ||||
|       g_mutex_unlock (mem_profile); | ||||
|       g_mutex_unlock (mem_profile_lock); | ||||
| #endif /* ENABLE_MEM_PROFILE */ | ||||
|       mem = t; | ||||
| #endif /* ENABLE_MEM_PROFILE || ENABLE_MEM_CHECK */ | ||||
| @@ -408,12 +408,12 @@ g_mem_profile (void) | ||||
|   gulong local_allocated_mem; | ||||
|   gulong local_freed_mem;   | ||||
|  | ||||
|   g_mutex_lock (mem_profile); | ||||
|   g_mutex_lock (mem_profile_lock); | ||||
|   for (i = 0; i < (MEM_PROFILE_TABLE_SIZE - 1); i++) | ||||
|     local_allocations[i] = allocations[i]; | ||||
|   local_allocated_mem = allocated_mem; | ||||
|   local_freed_mem = freed_mem; | ||||
|   g_mutex_unlock (mem_profile); | ||||
|   g_mutex_unlock (mem_profile_lock); | ||||
|  | ||||
|   for (i = 0; i < (MEM_PROFILE_TABLE_SIZE - 1); i++) | ||||
|     if (local_allocations[i] > 0) | ||||
|   | ||||
							
								
								
									
										12
									
								
								gmem.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								gmem.c
									
									
									
									
									
								
							| @@ -304,9 +304,9 @@ g_realloc (gpointer mem, | ||||
| #if defined(ENABLE_MEM_PROFILE) || defined(ENABLE_MEM_CHECK) | ||||
|       t = (gulong*) ((guchar*) mem - SIZEOF_LONG); | ||||
| #ifdef ENABLE_MEM_PROFILE | ||||
|       g_mutex_lock (mem_profile); | ||||
|       g_mutex_lock (mem_profile_lock); | ||||
|       freed_mem += *t; | ||||
|       g_mutex_unlock (mem_profile); | ||||
|       g_mutex_unlock (mem_profile_lock); | ||||
| #endif /* ENABLE_MEM_PROFILE */ | ||||
|       mem = t; | ||||
| #endif /* ENABLE_MEM_PROFILE || ENABLE_MEM_CHECK */ | ||||
| @@ -375,9 +375,9 @@ g_free (gpointer mem) | ||||
|       t = (gulong*) ((guchar*) mem - SIZEOF_LONG); | ||||
|       size = *t; | ||||
| #ifdef ENABLE_MEM_PROFILE      | ||||
|       g_mutex_lock (mem_profile); | ||||
|       g_mutex_lock (mem_profile_lock); | ||||
|       freed_mem += size; | ||||
|       g_mutex_unlock (mem_profile); | ||||
|       g_mutex_unlock (mem_profile_lock); | ||||
| #endif /* ENABLE_MEM_PROFILE */ | ||||
|       mem = t; | ||||
| #endif /* ENABLE_MEM_PROFILE || ENABLE_MEM_CHECK */ | ||||
| @@ -408,12 +408,12 @@ g_mem_profile (void) | ||||
|   gulong local_allocated_mem; | ||||
|   gulong local_freed_mem;   | ||||
|  | ||||
|   g_mutex_lock (mem_profile); | ||||
|   g_mutex_lock (mem_profile_lock); | ||||
|   for (i = 0; i < (MEM_PROFILE_TABLE_SIZE - 1); i++) | ||||
|     local_allocations[i] = allocations[i]; | ||||
|   local_allocated_mem = allocated_mem; | ||||
|   local_freed_mem = freed_mem; | ||||
|   g_mutex_unlock (mem_profile); | ||||
|   g_mutex_unlock (mem_profile_lock); | ||||
|  | ||||
|   for (i = 0; i < (MEM_PROFILE_TABLE_SIZE - 1); i++) | ||||
|     if (local_allocations[i] > 0) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user