Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Correct and enhance the alignment diagnostics added by check-in [0621d7037c]. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
7ca42fb6c0f655a65e56391d939f8af7 |
User & Date: | mistachkin 2018-01-15 18:18:20.139 |
Context
2018-01-15
| ||
19:22 | In SetTableError, avoid logging null virtual table error messages. check-in: 2de277f554 user: mistachkin tags: trunk | |
18:18 | Correct and enhance the alignment diagnostics added by check-in [0621d7037c]. check-in: 7ca42fb6c0 user: mistachkin tags: trunk | |
17:53 | Add comments with the offsets of various native structure members. check-in: 2e6de1738c user: mistachkin tags: trunk | |
Changes
Changes to System.Data.SQLite/SQLiteModule.cs.
︙ | |||
3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 | 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 | + + + + | /// </param> /// <returns> /// The actual size, in bytes, of the memory block specified via the /// native pointer. /// </returns> public static int Size(IntPtr pMemory) { #if DEBUG SQLiteMarshal.CheckAlignment("Size", pMemory, 0, IntPtr.Size); #endif #if !SQLITE_STANDARD return UnsafeNativeMethods.sqlite3_malloc_size_interop(pMemory); #elif TRACK_MEMORY_BYTES // // HACK: Ok, we cannot determine the size of the memory block; // therefore, just track number of allocations instead. // |
︙ | |||
3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 | 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 | + + + + | /// </summary> /// <param name="pMemory"> /// The native pointer to the memory block previously obtained from the /// <see cref="Allocate" /> method. /// </param> public static void Free(IntPtr pMemory) { #if DEBUG SQLiteMarshal.CheckAlignment("Free", pMemory, 0, IntPtr.Size); #endif #if TRACK_MEMORY_BYTES if (pMemory != IntPtr.Zero) { int blockSize = Size(pMemory); if (blockSize > 0) { |
︙ | |||
3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 | 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 | + + + + + | /// </summary> /// <param name="pMemory"> /// The native pointer to the memory block previously obtained from the /// SQLite core library. /// </param> public static void FreeUntracked(IntPtr pMemory) { #if DEBUG SQLiteMarshal.CheckAlignment( "FreeUntracked", pMemory, 0, IntPtr.Size); #endif UnsafeNativeMethods.sqlite3_free(pMemory); } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// |
︙ | |||
4026 4027 4028 4029 4030 4031 4032 | 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 | - + | /// </returns> public static int ReadInt32( IntPtr pointer, int offset ) { #if DEBUG |
︙ | |||
4059 4060 4061 4062 4063 4064 4065 | 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 | - + | /// </returns> public static long ReadInt64( IntPtr pointer, int offset ) { #if DEBUG |
︙ | |||
4092 4093 4094 4095 4096 4097 4098 | 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 | - + | /// </returns> public static double ReadDouble( IntPtr pointer, int offset ) { #if DEBUG |
︙ | |||
4127 4128 4129 4130 4131 4132 4133 | 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 | - + | /// </returns> public static IntPtr ReadIntPtr( IntPtr pointer, int offset ) { #if DEBUG |
︙ | |||
4163 4164 4165 4166 4167 4168 4169 | 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 | - + | public static void WriteInt32( IntPtr pointer, int offset, int value ) { #if DEBUG |
︙ | |||
4197 4198 4199 4200 4201 4202 4203 | 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 | - + | public static void WriteInt64( IntPtr pointer, int offset, long value ) { #if DEBUG |
︙ | |||
4231 4232 4233 4234 4235 4236 4237 | 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 | - + | public static void WriteDouble( IntPtr pointer, int offset, double value ) { #if DEBUG |
︙ | |||
4267 4268 4269 4270 4271 4272 4273 | 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 | + - - + + + | public static void WriteIntPtr( IntPtr pointer, int offset, IntPtr value ) { #if DEBUG CheckAlignment( |
︙ | |||
4315 4316 4317 4318 4319 4320 4321 | 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 | - + - + + - - + + - - + - - + - - - + + - - + - - - + + | } #endregion /////////////////////////////////////////////////////////////////////// #region Private Methods #if DEBUG |
︙ |