-1

I mean to say that the size of the buffers is fixed and won't change. I wonder wich way is more appropriate.

For example:

"Our approach employs statically sized buffers to avoid the overhead associated with resizing."

  • Could you provide us with a phrase in which the word in question could be used? – VTH Aug 5 '18 at 18:00
  • 3
    They're both valid, as is a static size buffer. But fixed-size buffer is far more common, and avoids the confusion in your usage caused by the fact that "static" variables aren't the same thing as variables dynamically allocated on the stack, regardless of their size. – FumbleFingers Aug 5 '18 at 18:03
  • Your example needs the indefinite article a statically sized buffer (or pluralise to buffers if you use more than one). – FumbleFingers Aug 5 '18 at 18:07
  • @FumbleFingers that's a good point. I think I'll go with that. I meant to say "buffers" in the example. – Bruno Nascimento Aug 5 '18 at 18:08
  • 1
    I hope your example really is just a hypothetical one though. Fixed-size buffers are one of the leading causes of insecure software, and with multiple layers of progressively faster (but smaller) memory stores, it might turn out that an app that allocates huge fixed (but potentially still vulnerable) buffers actually runs slower because unnecessarily large chunks have to thread their way up the memory caches to the processor (still waiting for memory i/o, when it could long ago have eaten for breakfast the trivial task of resizing! :) – FumbleFingers Aug 5 '18 at 18:13
2

You can either use "static buffer(s)" or "fixed-size buffer(s)". Technically, Fixed Size buffer is more appropriate and widely used.

"Our approach employs a static sized buffers to avoid the overhead associated with resizing."

or

"Our approach employs a fixed-sized buffers to avoid the overhead associated with resizing."

  • Haha! You included both ways to fix the grammar, as I suggested in a comment before. But you're quite right on the substance, of course. I leave it to you as a new user to edit your own post (whichever way round you fancy! :) – FumbleFingers Aug 5 '18 at 18:15
  • 1
    @ubihatt: But do you not agree that static[ally] carries unwanted and potentially distracting / confusing associations with the special significance of "static" in many programming languages? Both static and dynamic pointer variables may reference both fixed-size and dynamically-allocated data spaces. – FumbleFingers Aug 5 '18 at 18:30
  • 1
    Yeah. I'm inclined to think it's Off Topic "domain-specific usage" that should be on CS SE. But there's no preset "migration path" for that, and it happens to be an area of interest to many here on ELU anyway, so I didn't think it would be right to vote to close. But your answer is fine, and doesn't get bogged down in the opinion-based "hyphenate or not?" issue. – FumbleFingers Aug 5 '18 at 18:42
  • 1
    @FumbleFingers on the other question Is there a single word for deep sea exploration diving can we use "Demersal Dive"? Though, demersal is mainly associated with life forms found near the bottom of the sea? Don't have enough reputation to comment there :( – Ubi hatt Aug 5 '18 at 19:02
  • 1
    Current rep 44 - you'll be able to comment pretty soon, I'm sure! But you might consider answering, which doesn't have a rep threshold. – FumbleFingers Aug 5 '18 at 19:09
0

The more technical term is "statically allocated" (viz dynamically allocated). With static allocation all your memory is prepared in advance at compile time as opposed to an on demand run-time allocation from a pool. With size, it refers to a buffer in use, whereas allocation has a wider inference of its capability before it is filled and the memory management practices in place.

As an example in c++ you have methods size and capacity for a vector. The first is how much is currently utilised. The second is how much has been allocated (that is how much you can fill before needing a resize option)

It's not just correct in a technical sense. Semantically, statically sized is incorrect. Sizing refers to measurement and so statically is the incorrect adverb. Other terms such as "fixed size" are correct, but do not convey what you want to say as well as "statically allocated".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.