Skip to main content
deleted 26 characters in body
Source Link
user4442671
user4442671

My question is exactly what values are stored in the TLS slots, memory address or actual data values?

Both!

This is covered by the following paragraph in your link:

If the data associated with an index will fit in an LPVOID value, you can store the data directly in the TLS slot. However, if you are using a large number of indexes in this way, it is better to allocate separate storage, consolidate the data, and minimize the number of TLS slots in.

This is a technique known as Small Object Optimization, where some storage can either be a value or a pointer to a some other memory location depending on the size of what is being stored. The paragraph is just a roundabout way of saying:

"It's a table of pointers. We"We recommend you use SOO if you can, since the system doesn't look at the value of the pointers."

And if memory address pointers, im supposing these addresses are then accessed to get the value stored at the memory block.

Correct, but only if you choose to use the storage as a pointer.

Is it also correct that 2 memory spaces are allocated, one for LPVOID array values and there others for memory space blocks for the indexes? It said if using a large number of indexes and LPVOID arrays, its better to allocate a separate memory space to avoid occupying TLS slots, is this what the memory blocks refer to, data is stored in the memory blocks instead and addresses in slots to avoid data overload in the slots?

Not really, it's just one big table of pointers. If you want the pointers to point somewhere meaningful, you'll need to allocate some memory to be pointed at, but there's nothing special about that allocation.

My question is exactly what values are stored in the TLS slots, memory address or actual data values?

Both!

This is covered by the following paragraph in your link:

If the data associated with an index will fit in an LPVOID value, you can store the data directly in the TLS slot. However, if you are using a large number of indexes in this way, it is better to allocate separate storage, consolidate the data, and minimize the number of TLS slots in.

This is a technique known as Small Object Optimization, where some storage can either be a value or a pointer to a some other memory location depending on the size of what is being stored. The paragraph is just a roundabout way of saying:

"It's a table of pointers. We recommend you use SOO if you can, since the system doesn't look at the value of the pointers."

And if memory address pointers, im supposing these addresses are then accessed to get the value stored at the memory block.

Correct, but only if you choose to use the storage as a pointer.

Is it also correct that 2 memory spaces are allocated, one for LPVOID array values and there others for memory space blocks for the indexes? It said if using a large number of indexes and LPVOID arrays, its better to allocate a separate memory space to avoid occupying TLS slots, is this what the memory blocks refer to, data is stored in the memory blocks instead and addresses in slots to avoid data overload in the slots?

Not really, it's just one big table of pointers. If you want the pointers to point somewhere meaningful, you'll need to allocate some memory to be pointed at, but there's nothing special about that allocation.

My question is exactly what values are stored in the TLS slots, memory address or actual data values?

Both!

This is covered by the following paragraph in your link:

If the data associated with an index will fit in an LPVOID value, you can store the data directly in the TLS slot. However, if you are using a large number of indexes in this way, it is better to allocate separate storage, consolidate the data, and minimize the number of TLS slots in.

This is a technique known as Small Object Optimization, where some storage can either be a value or a pointer to a some other memory location depending on the size of what is being stored. The paragraph is just a roundabout way of saying:

"We recommend you use SOO if you can, since the system doesn't look at the value of the pointers."

And if memory address pointers, im supposing these addresses are then accessed to get the value stored at the memory block.

Correct, but only if you choose to use the storage as a pointer.

Is it also correct that 2 memory spaces are allocated, one for LPVOID array values and there others for memory space blocks for the indexes? It said if using a large number of indexes and LPVOID arrays, its better to allocate a separate memory space to avoid occupying TLS slots, is this what the memory blocks refer to, data is stored in the memory blocks instead and addresses in slots to avoid data overload in the slots?

Not really, it's just one big table of pointers. If you want the pointers to point somewhere meaningful, you'll need to allocate some memory to be pointed at, but there's nothing special about that allocation.

edited body
Source Link
user4442671
user4442671

My question is exactly what values are stored in the TLS slots, memory address or actual data values?

Both!

This is covered by the following paragraph in your link:

If the data associated with an index will fit in an LPVOID value, you can store the data directly in the TLS slot. However, if you are using a large number of indexes in this way, it is better to allocate separate storage, consolidate the data, and minimize the number of TLS slots in.

This is a technique known as Small Object Optimization, where some storage can either be a value or a pointer to a some other memory location depending on the size of what is being stored. The paragraph is just a roundabout way of saying:

"It's a table of pointerpointers. Feel free toWe recommend you use SOO in there if you wantcan, since the system doesn't look at the value of the pointers."

And if memory address pointers, im supposing these addresses are then accessed to get the value stored at the memory block.

Correct, but only if you choose to use the storage as a pointer.

Is it also correct that 2 memory spaces are allocated, one for LPVOID array values and there others for memory space blocks for the indexes? It said if using a large number of indexes and LPVOID arrays, its better to allocate a separate memory space to avoid occupying TLS slots, is this what the memory blocks refer to, data is stored in the memory blocks instead and addresses in slots to avoid data overload in the slots?

Not really, it's just one big table of pointers. If you want the pointers to point somewhere meaningful, you'll need to allocate some memory to be pointed at, but there's nothing special about that allocation.

My question is exactly what values are stored in the TLS slots, memory address or actual data values?

Both!

This is covered by the following paragraph in your link:

If the data associated with an index will fit in an LPVOID value, you can store the data directly in the TLS slot. However, if you are using a large number of indexes in this way, it is better to allocate separate storage, consolidate the data, and minimize the number of TLS slots in.

This is a technique known as Small Object Optimization, where some storage can either be a value or a pointer to a some other memory location depending on the size of what is being stored. The paragraph is just a roundabout way of saying:

"It's a table of pointer. Feel free to use SOO in there if you want, the system doesn't look at the value of the pointers."

And if memory address pointers, im supposing these addresses are then accessed to get the value stored at the memory block.

Correct, but only if you choose to use the storage as a pointer.

Is it also correct that 2 memory spaces are allocated, one for LPVOID array values and there others for memory space blocks for the indexes? It said if using a large number of indexes and LPVOID arrays, its better to allocate a separate memory space to avoid occupying TLS slots, is this what the memory blocks refer to, data is stored in the memory blocks instead and addresses in slots to avoid data overload in the slots?

Not really, it's just one big table of pointers. If you want the pointers to point somewhere meaningful, you'll need to allocate some memory to be pointed at, but there's nothing special about that allocation.

My question is exactly what values are stored in the TLS slots, memory address or actual data values?

Both!

This is covered by the following paragraph in your link:

If the data associated with an index will fit in an LPVOID value, you can store the data directly in the TLS slot. However, if you are using a large number of indexes in this way, it is better to allocate separate storage, consolidate the data, and minimize the number of TLS slots in.

This is a technique known as Small Object Optimization, where some storage can either be a value or a pointer to a some other memory location depending on the size of what is being stored. The paragraph is just a roundabout way of saying:

"It's a table of pointers. We recommend you use SOO if you can, since the system doesn't look at the value of the pointers."

And if memory address pointers, im supposing these addresses are then accessed to get the value stored at the memory block.

Correct, but only if you choose to use the storage as a pointer.

Is it also correct that 2 memory spaces are allocated, one for LPVOID array values and there others for memory space blocks for the indexes? It said if using a large number of indexes and LPVOID arrays, its better to allocate a separate memory space to avoid occupying TLS slots, is this what the memory blocks refer to, data is stored in the memory blocks instead and addresses in slots to avoid data overload in the slots?

Not really, it's just one big table of pointers. If you want the pointers to point somewhere meaningful, you'll need to allocate some memory to be pointed at, but there's nothing special about that allocation.

Source Link
user4442671
user4442671

My question is exactly what values are stored in the TLS slots, memory address or actual data values?

Both!

This is covered by the following paragraph in your link:

If the data associated with an index will fit in an LPVOID value, you can store the data directly in the TLS slot. However, if you are using a large number of indexes in this way, it is better to allocate separate storage, consolidate the data, and minimize the number of TLS slots in.

This is a technique known as Small Object Optimization, where some storage can either be a value or a pointer to a some other memory location depending on the size of what is being stored. The paragraph is just a roundabout way of saying:

"It's a table of pointer. Feel free to use SOO in there if you want, the system doesn't look at the value of the pointers."

And if memory address pointers, im supposing these addresses are then accessed to get the value stored at the memory block.

Correct, but only if you choose to use the storage as a pointer.

Is it also correct that 2 memory spaces are allocated, one for LPVOID array values and there others for memory space blocks for the indexes? It said if using a large number of indexes and LPVOID arrays, its better to allocate a separate memory space to avoid occupying TLS slots, is this what the memory blocks refer to, data is stored in the memory blocks instead and addresses in slots to avoid data overload in the slots?

Not really, it's just one big table of pointers. If you want the pointers to point somewhere meaningful, you'll need to allocate some memory to be pointed at, but there's nothing special about that allocation.